Greetings fellow programmers!

I'm doing a computer vision project in my AI class and am looking for some tips.

My task is to read a bitmap into memory and alter that image file and find an object within it. In my case, I'm searching for a box that appears in the picture. For simplicity, the images are only black and white (0-255).

So far, I'm able to read the file into memory and store them into an array for both the header and the image data.

My plan is to convert the data in the array(each array element is the binary representation of one pixel) into integers so I can analyze them. However, I'm not sure how to approach this.

If anyone have any idea how to accomplish this or have other ideas. Please do tell.


What kind of data do you have in the array now? RGB values maybe? What language do you use?

The language I'm using is C/C++. I'm not sure, but I stored the header into a separate arrays and the image(probably the rgb value) into it's own array. The image is black and white so it makes the problem simpler.

Ok can't you just print some of the content in the array to se whats inside? Do you mean black and white or grayscale when you say black and white, there's a huge difference?

When you are saying 'searching for a box', what does it mean? You want to read in an image and produce another image which contains only the box? Sounds like computer vision. Anyway, you may need to do edge detection first, and then search for the box from the edge. After you get the edge of your object, mask it back with the original image to get the object image. I never did it in C, C++ because I used MatLab when I did this...