Demo entry 6749079

Calculation of XY offset

   

Submitted by anonymous on Jun 12, 2018 at 09:19
Language: C++. Code size: 414 Bytes.

if (distance>60)
			{
				for (int m = 0; m<height / 6; m++)//用for循环来提取有效的深度信息,因为有些点由于bm算法原因是没有距离的
				{
					for (int n = -width / 6; n<width / 6; n++)
					{
						if ((Center.x + n)>0 && (Center.x + n)<640)
						{
							if (distance<60)
								break;
							else
								distance = depth.at<float>(Center.y + m, Center.x + n);
						}

					}
					if (distance<60)
						break;

				}
			}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).