Click here to Skip to main content
15,890,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello guys.
I want to have a algo or c-program that can save image pixel values in a matrix similar like we do in MATLAB
I have a bmp image which black and white only that its pixel values is only 0 or 255 (black or white)
Now I want to save all that pixel values in a 2D matrix in a c-program
so, is there any way to this?

What I have tried:

I used Cimg and imagemagick they are very slow.
Posted
Updated 28-Mar-16 2:27am

An algo:
for each row
    for each col
        read pixel
        save in matrix
 
Share this answer
 
I know that algo but C directly did not read bit map images with file handling
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900