Items with no label
3335 Discussions

how can i change sr300 hw setting room hand face body

江吴
Novice
2,838 Views

I convert the color coordinates to 3D coordinates, but most of them are empty. In addition to 500mm, I'd like to take a further distance. But don't know how to set.

See Camera Explorer inside HWSetting Room mode is far away. But don't know how to set.

sts = m_pProjection->QueryInvUVMap(sample->depth, &m_uvmap[0]);sts = m_pProjection->QueryVertices(sample->depth, &m_vertices[0]);

void RealSenseDevice::GetCameraPos(Point2i screenPoint, Point3f &cameraPoint)

{

if(screenPoint.x >= m_nColorSize.width || screenPoint.y >= m_nColorSize.height || screenPoint.y < 0 || screenPoint.x < 0)

{

cameraPoint.x = -1;

cameraPoint.y = -1;

cameraPoint.z = -1;

return ;

}

int nIndex = screenPoint.x + screenPoint.y*m_nColorSize.width;

RealSense::PointF32 pos = m_uvmap[nIndex];

if(pos.x != -1 && pos.y != -1)

{

nIndex = m_uvmap[nIndex].x*m_nDepthSize.width + m_uvmap[nIndex].y*m_nDepthSize.height * m_nDepthSize.width;

cameraPoint.x = m_vertices[nIndex].x;

cameraPoint.y = m_vertices[nIndex].y;

cameraPoint.z = m_vertices[nIndex].z;

}

}

0 Kudos
18 Replies
idata
Employee
447 Views

Hi Johance,

 

 

Thanks for your interest in the Intel RealSense Technology.

 

 

We would like to investigate a little bit more about that and as soon as we have useful information we'll let you know.

 

 

We'll appreciate your patience during the meantime.

 

 

Regards,

 

-Yermi A.

 

0 Kudos
MartyG
Honored Contributor III
447 Views

I just wanted to add that if you are asking how to increase the SR300's depth scanning range, you can use the SetIVCAMFilterOption instruction to extend the SR300's depth scanning range up to 4m (4000 mm), though accuracy reduces as you get further away.

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?setivcamfilteroption_device_pxccapture.html Intel® RealSense™ SDK 2016 R2 Documentation

I believe that when you say the coordinates are empty, you mean that you are getting a null value from QueryVertices?

I am not a stream programming expert. But in researching your script, I never came across two lines together like this:

sts = m_pProjection->QueryInvUVMap(sample->depth, &m_uvmap[0]);

sts = m_pProjection->QueryVertices(sample->depth, &m_vertices[0]);

Most people just used one of these lines:

sts = m_pProjection->QueryVertices(sample->depth, &m_vertices[0]);

Like I said, I am not a stream expert. But it seemed to me as though you were trying to use two methods at the same time to convert depth into coordinates, which is perhaps why the script was returning null. My advice would be to delete this line so that you use QueryVertices only, and then see what happens:

sts = m_pProjection->QueryInvUVMap(sample->depth, &m_uvmap[0]);

0 Kudos
江吴
Novice
447 Views

I'm doing bike fitting applications.

I need to know the coordinates of a given point.

All I need to match the color of the 3D coordinates.

Need QueryInvUVMap and QueryVertices mapping.

I have used SetIVCAMFilterOption (4) before but the effect is not obvious. (intel_rs_sdk_mw_core_offline_11.0.27.1384)SetIVCAMFilterOption (4) is not valid in this SDK?

Sometimes there are coordinates in m_vertices but most of them are 0, 0, or 0, unless SR300 is facing a wall and is very close, and m_vertices is not 0,0,0.

I use Microsoft Kinect to do BikeFitting this is all right. But he was only 30fps. So I chose SR300, it can be 60fps. But now the depth is not stable enough, and the distance is too close. We need about 1.5M stable depth data

0 Kudos
MartyG
Honored Contributor III
447 Views

The default maximum range of the SR300 camera is 1.5 m. So you should be able to scan from further away than 500 mm already if you move the camera further away from the bike.

0 Kudos
江吴
Novice
447 Views

am using SetIVCAMFilterOption (7) farthest mode.

1.6m can meet the stability of the depth of data. 2M or not, but can meet the current needs of it.

Follow up we will do multiple bike fitting data test to see the stability.

Thank you.

0 Kudos
MartyG
Honored Contributor III
447 Views

Thanks very much for the update, Johance. Please let us know the results of your testing.

0 Kudos
江吴
Novice
447 Views

There are new problems, still in the test. Now the SetIVCAMFilterOption (7) can be used to get the coordinates, but it is unstable. 1.5M invalid value is relatively small, but a lot of invalid 2M value, can not meet the requirements, is now looking for solutions. Invalid value refers to the m_vertices x z y are -1

0 Kudos
MartyG
Honored Contributor III
447 Views

I could not find any direct information about why your vertices value would return a -1 value because of SetIVCamFilterOption. However, some information on RealSense scene perception in the Librealsense Crosswalk documentation suggested that a negative value indicates a tracking failure, and that '-1' means that the scene lacks structural / geometry information. Another way to put that may be that the camera cannot see the object being scanned well enough to get a good reading.

This 'negative number to indicate tracking failure' system is also explained in old R5 (from 2015) RealSense SDK release notes like this: "CheckSceneQuality now returns positive values indicating the scene'trackability' and negative values (-1.0 or -2.0) giving more details on the reasons of potential tracking failures",. So it seems to be a general RealSense SDK feature, and not just one for Librealsense / Crosswalk.

This explanation for -1 value may have nothing to do with your particular problem. But the camera not being able to see the object properly is at least a reasonable possible explanation for why you are getting bad values.

But doing more research, I am getting the feeling that it is going to be related to vertices programming. And that is a question that jb455 is best qualified to answer if he sees this.

0 Kudos
jb455
Valued Contributor II
447 Views

The vertex will be (-1,-1,-1) if there's no depth data for that pixel.

I've mostly been optimising for short-range applications so haven't spent much time looking at increasing the range. Have you tried playing with https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?setivcammotionrangetradeoff_device_pxccapture.html MotionRangeTradeOff? I think that should help you increase the maximum range, but the penalty will be longer exposure meaning you'll have to keep the camera & subject steadier to get a good image.

0 Kudos
江吴
Novice
447 Views

I used to be Kinect, he is very stable depth, you can get to. But the frame rate is only 30fps.

If you use what you say, it can't satisfy our needs. We have to be relatively high frame rate, and the depth to be stable.

I have a video above shows the coordinates to get, but sometimes there is no coordinate coordinates.

There is no better way to keep the frame rate under the circumstances.

https://youtu.be/5fx7VCEoybk QQ视频20170426183727 - YouTube

0 Kudos
江吴
Novice
447 Views

Not 000 is the data, otherwise it is -1-1-1

Sometimes there are data, sometimes no data

0 Kudos
jb455
Valued Contributor II
447 Views

If you need longer range than the SR300 can give you, I'd suggest looking at the R200 camera: that's designed for up to 4m or so.

0 Kudos
jb455
Valued Contributor II
447 Views

The reason some of them are (-1,-1,-1,) and others are (0,0,0) is that not all pixels in the colour image have a mapping to the depth image. The way you've set up your method is by checking if(pos.x != -1 && pos.y != -1) - if that is false, there is no mapping so that cameraPoint will be left at its default (0,0,0) but if there is a mapping but no depth data it'll be (-1,-1,-1). If you want it to be consistent you could put an else and set x,y&z to -1 if there's no mapping.

0 Kudos
江吴
Novice
447 Views

We were just buying the R200 that was worse.

0 Kudos
江吴
Novice
447 Views

We've dealt with that. Show 000. Originally want to invalid data is not collected, but invalid data too much. This can collect too little data.

We map the points are the points on the body, the distance should not be a problem. But there's no data. Is there any other equipment recommended?

0 Kudos
江吴
Novice
447 Views

void RealSenseDevice::GetCameraPos(Point2i screenPoint, Point3f &cameraPoint)

{

if(screenPoint.x >= m_nColorSize.width || screenPoint.y >= m_nColorSize.height || screenPoint.y < 0 || screenPoint.x < 0)

{

cameraPoint.x = -1;

cameraPoint.y = -1;

cameraPoint.z = -1;

return ;

}

int nIndex = screenPoint.x + screenPoint.y*m_nColorSize.width;

RealSense::PointF32 pos = m_uvmap[nIndex];

if(pos.x != -1 && pos.y != -1)

{

nIndex = m_uvmap[nIndex].x*m_nDepthSize.width + m_uvmap[nIndex].y*m_nDepthSize.height * m_nDepthSize.width;

cameraPoint.x = m_vertices[nIndex].x;

cameraPoint.y = m_vertices[nIndex].y;

cameraPoint.z = m_vertices[nIndex].z;

}

}

0 Kudos
idata
Employee
447 Views

Hi Johance,

 

 

I'm sorry to hear you are still getting issues. The effective range of the SR300 is .2m - 1.5m so depth results beyond those ranges are indeterminate. The R200 is a better camera to use for further ranges. We will do further testing to see what results are like in the 2m range for the SR300.

 

 

Regards,

 

-Yermi A.

 

0 Kudos
Reply