what is the best for object tracking??
I have one urdf model of a car. It gets one camera in front of it. its grabbing the picture and publishing on a topic. I have write a callBack function where it will receive the image data. By the pixel by pixel data it will convert it to a opencv image, and will display on a window. Now my next step is to use the image data to track one target object. which will be the best way to do. I am really stuck in here.
flag = 0;
ROS_INFO("in image node function");
int h = *(&img->height);
int w = *(&img->width);
cv::WImageBuffer3_b image(h,w);
int step = image.WidthStep();
step = 3;
for(int i=(h-1);i>=0;i--)
{
for(int j=(w-1);j>=0;j--)
{
*(image(i,j)) = *(&img->data[count]);
count++;
*(image(i,j)+1) = *(&img->data[count]);
count++;
*(image(i,j)+2) = *(&img->data[count]);
count++;
}
}
//ROS_INFO("data = [%d]",*(&img->data[0]));
cvStartWindowThread();
cvShowImage("view",image.Ipl());
the above is my imagecall back function. I have all the pixel data. please help me. Thank you in advance
I am really stuck in here, please give me any hints,,, thank you in advance
This has been the topic of a great many PhD theses. It may help if you can constrain your problem a little bit.
using those pixel data I am able to generate the image. it is perfectly showing. the problem is the structure I am using to store the image file with all the relevant data is a WImagebuffer3_b. In order to perform any image processing I am gonna need in cv::Mat format. will cv_bridge will be perfect