user1708601
user1708601

Reputation: 19

Extract part of an image in C language

I am doing a project on image processing. I need to perform preprocessing of the input image( which is a .bmp etc file) first. Can anyone please help me with a C language code. I have to extract only that part of the image that has the data and not the background. For example, I need to extract the area where the person signs and not the entire white background of the screen.

Upvotes: 0

Views: 446

Answers (1)

Osiris
Osiris

Reputation: 4185

I'd advise you to check OpenCV. You'll have access to functions to load images and perform many image processing operations.

Read their documentation for more info on how to remove the white background. One way could be to iterate through all image pixels, and find the smallest area of the images that contains all non-white pixels.

Upvotes: 3

Related Questions