Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ROS image is an image in the Robot Operating System. cv_ptr is a pointer to that image. For a faster access a float pointer is made (I would prefer to use cv::Ptr, std::unique_ptr, or std::auto, instead). Every image.ptr<float>(i) is a pointer to the i-th row of the matrix image. Every element of that row pointer is an element on a column (row i, col j). So by the pointer, the element is accessed; the pointer points to the address of that float (image pixel).

I am not sure what exactly ptr_img_B is doing, but some kind of operation on that pixel (because ptr_img_A is incremented)