extract pixel values in images raw by raw c++ [closed]

asked 2019-09-04 02:16:16 -0500

ymw gravatar image

updated 2019-09-04 02:49:49 -0500

Hi, I need to extract rows of an image(size 640x480) as arrays without using for loops. please refer the image attached. please tell me how to do that.thanks image description

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-09-27 13:49:20.668462

Comments

1

like this?

uchar* yellow_array=src.ptr<uchar>(0); uchar* orange_array=src.ptr<uchar>(1); uchar* green_array=src.ptr<uchar>(2); uchar* brown_array=src.ptr<uchar>(3);

gino0717 gravatar imagegino0717 ( 2019-09-04 02:23:58 -0500 )edit
1

it's entirely unclear, what you're trying to achieve with it, or what you need it for (thus a possible XY problem)

please explain ?

opencv's cv:::Mat has a convenient row() member. is that what you're looking for ?

berak gravatar imageberak ( 2019-09-04 02:52:40 -0500 )edit

hi @gino0717, this is what i was looking for, thank you very much for your reply.

ymw gravatar imageymw ( 2019-09-04 03:08:03 -0500 )edit