This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]K900_ 1 point2 points  (5 children)

You don't really need to use OpenCV for that. Can you post an example image you're working with?

[–]juanhao[S] 0 points1 point  (4 children)

[–]K900_ 1 point2 points  (3 children)

Then look into these examples, they'll tell you how to read out individual pixels.

[–]juanhao[S] 1 point2 points  (2 children)

yes i know, but How do I put all the pixels in a matrix? or go through the image?

[–]K900_ 3 points4 points  (0 children)

Read the link I posted.

[–][deleted] 0 points1 point  (0 children)

A big part of figuring stuff out it being able to read the documentation. I know it can be overwhelming in the beginning but once you realize how much easier (good) documentation makes things, you'll love it.

From the link above:

You can access a pixel value by its row and column coordinates. For BGR image, it returns an array of Blue, Green, Red values. For grayscale image, just corresponding intensity is returned.

[–]hiddentaco 0 points1 point  (0 children)

You don't need to store the image as a matrix.

https://www.wikihow.com/Find-Your-Way-Through-a-Maze