如何将2D网络摄像头帧中的像素值转换为X和Y坐标值? [英] How Can I Convert Pixel Values In A 2D Webcam Frame To X And Y Coordinate Values?

查看:189
本文介绍了如何将2D网络摄像头帧中的像素值转换为X和Y坐标值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在我的网络摄像头框架中移动时获取跟踪对象的像素值。我的目标是获取这些像素值的样本,并获得每个像素值的X和Y坐标。我不知道怎么做?我正在使用Opencv和c ++,有没有办法可以进行转换?谢谢

I can get the pixel values of my tracking object as it moves around in my webcam frame. My goal is to take a sample of those pixel values and get the X and Y coordinates for each pixel values. I have no clue how to do it? I am using Opencv and c++, is there a way i can do that transformation? Thanks

推荐答案

是的。您现在必须使用包格式( - > google如何解压缩)以及框架的大小和一个像素的大小。



大部分数据以像素方式打包的时间,以水平方式排列。在该行的末尾可能是称为填充的seom填充像素。



更多细节 - >更好的答案; - )
Yes. You must now the "package format" (->google how to unpack) and so the size of the frame and the size of one pixel.

Most of the time the data is packed in pixels, which are arranged in horizontal manner. At the end of that "line" may be seom fill pixels called "padding".

More details -> better answer ;-)


这篇关于如何将2D网络摄像头帧中的像素值转换为X和Y坐标值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆