- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HELLO!
I tried to capture object with markers in front of a SR300. I get the words coordinates of markers pasted on static object , they seem to be right but they varies in a large range, especially in z-value(ranges from -3 mm to 3 mm,; i, j ranges little).
the method I used to get the word coordinates are:
1. Get (i, j) value of markers;
2. Map (i, j) to (u, v) by QueryInvUVMap() and get the depth values mapped;
3. Use ProjectColorToCamera() to get world coordinates from(I, j, depth) to (x, y, z);
4. Take 300 samples of (x, y, z) ;
tips:
1.in case of all markers I tracked are all close to sr300(<500mm), I've set SetIVCAMFilterOption(3) (very close ranges);
2.color and depth solutions are all set to 640*480*30fps;
I want to know if there is something wrong when I configured my SR300 or any measures to gain more stable depth values.
Or that's what's the best of SR300 can do.
looking forward to your reply, thanks:)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a similar problem . If you find a solution outside this forum, please share it here too!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello easonSu,
Thanks for reaching out!
Please let me see what I can find out about this, I'll get back to you as soon as possible.
Pedro M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply!
I would like to specify my question as I brought my data here! Showed below:
which:
A: x-axis for sample count(time also), y-axis for u coordinate of (u, v) in depth image;
B: x-axis for sample count(time also), y-axis for v coordinate of (u, v) in depth image;
C: x-axis for sample count(time also), y-axis for depth value of (u, v) query by "pxcF32 tmpdepth = *(pxcF32*)(depth_data.planes[0] + v * depth_data.pitches[0] + 4 * u);";
D: 3-d view of (u, v, depth value) floating;
PLEASE advise me what to do to gain more stable depth value, thanks very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for sharing this data with us, it exemplifies very clearly what is happening. I'm still working on this but my guess is that ±3mm discrepancies that you mention might be caused by the camera's tolerance. I mean, it is much simpler for the camera to determine the x and y positions of an object since it only has to compare those positions to a fixed point. However, as you may know measuring the z position is not as simple, it uses the depth camera to compare it to another image and determine the depth with specific calculations, which is why I believe that ±3mm is a difference small enough to be within the camera's tolerance.
Nevertheless, I'm still investigating what might be happening, I'll try to get back to you as soon as possible.
Pedro M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello easonSu,
I wanted to update you and let you know that we are still working on this but there are a few questions we would like to ask you, mainly related to the details of your environment:
1. What type of object and marker did you use?
2. How far away was the camera?
3. Can you send us the OBJ file?
4. How did you scan it?
5. What were the lighting conditions?
The more details you are able to provide the more we can help.
We will be waiting for your response.
Pedro M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi easonSu,
We are still working on this case but we would find very helpful if you could provide us the information we requested you in our previous post.
We will be waiting for your response.
Pedro M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reply!
here's my answers:
1:marker are red circles pasted in hardboard, as showed in picture below:
2: I tried different distance of the markers from the camera, from 230mm-560mm, the depth values seem perform the same, floatingl ike:
which:
red for the raw depth data;
green for i use a algorithm to smooth them;
3: I can but I do not know how could i send you fileS.
4, 5:AS THE PICTURE SHOWS.
TIPS: I YOU NEED I CAN SEND MY CODE TO YOU, THANK YOU FOR HELP!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi easonSu,
Thank you for providing us this information, it is of much help. Regarding the OBJ files, there is button to attach files to the post but it is harder to find than it should. Check the screenshots below to learn how to use this feature:
Regarding the code, yes, please share it here, it could also be of help.
I will be waiting for your reply.
Pedro M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
KEY CODE:
/*********************get depth_data*******************/
depthIm->AcquireAccess(PXCImage::ACCESS_READ, PXCImage::PIXEL_FORMAT_DEPTH_F32, &depth_data);
/*************colorPoints is the detected point coordinates (i, j) in color image, scaled to (0,1)*****************/
int csize = colorPoints.size();
PXCPointF32 invP = { -1.f, -1.f };
vector ccordsAbs(csize, invP);
for (int i = 0; i < csize; i++)
{
/****Return (i, j) to (0, weight) * (0, height)*****/
ccordsAbs[i].x = colorPoints[i].x * cwidth, ccordsAbs[i].y = colorPoints[i].y * cheight;
}
/************get mapped (u,v)**************/
vector projPoints;
projPoints.resize(csize);
projection->MapColorToDepth(depthIm, csize, &ccordsAbs[0], &projPoints[0]);
vector mappedVertices;
mappedVertices.resize(csize);
for (int i = 0; i < projPoints.size(); i++)
{
int u = (int)(projPoints[i].x);
int v = (int)(projPoints[i].y);
pxcF32 tmpdepth = *(pxcF32*)(depth_data.planes[0] + v * depth_data.pitches[0] + 4 * u);
mappedVertices[i].z = tmpdepth;
PXCPoint3DF32 _p_key = { colorPoints[i].x*cwidth, colorPoints[i].y*cheight, mappedVertices[i].z }, _p_keyout;
projection->ProjectColorToCamera(1, &_p_key, &_p_keyout);
mappedVertices[i].x = _p_keyout.x;
mappedVertices[i].y = _p_keyout.y;
}
/*********************************end****************************/
I HOPE YOU CAN GET IT AS THEY ARE NOT VERY ORGANIZED
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot for sharing this information with us. Please let us analyze it to see if we can determine what might be happening. We are able to find anything useful, we'll make sure to share it with you in this thread.
Pedro M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi easonSu,
We noticed that the .obj file that you shared with us is corrupted. Could you please share it again? You can use a cloud storage link to share it, in case that's more convenient for you.
However, you might be interested in checking the sample found in C:\Program Files (x86)\Intel\RSSDK\sample\DF_Projection. We'd suggest you to look at the source file projection.cpp, specifically in line 60. The function Projection::ColorToDepthByQueryUVMap may contain some code that can help you in your project.
We'll be waiting for your response.
Pedro M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi easonSu,
I'm not sure what might be happening, but every time I try to open the file you shared I get the following error:
Are you sure there is nothing wrong with this file?
Anyhow, did you have a chance to check the sample we suggested? Does it help?
Pedro M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello easonSu,
Do you have any updates about this?
Have you been able to test the sample we mentioned above? Was it helpful?
Pedro M.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page