krishni andradi
krishni andradi

Reputation: 37

Identify and Change brightness and contrast so it is suitable for image processing, using opencv and C++

I want to do image processing using OpenCV and C++. When I am capturing an image in a dark environment it seems to be hard to do people detection. Changing brightness and contrast may help the situation. But my project is related with computer vision. So i want my program to identify weather there is a need of adding or reducing brightness and contrast, But how to identify that? I have no idea, Please help

Upvotes: 1

Views: 1214

Answers (3)

Cristi
Cristi

Reputation: 718

I think you should consider using an infrared camera. See this article here for example: "Selection of a Visible-Light vs. Thermal Infrared Sensor in Dynamic Environments Based on Confidence Measures", authors: Cuerda and coworkoers.

Upvotes: 0

Ahmad Musa
Ahmad Musa

Reputation: 13

I believe, You can try "histogram equalization" . Here is an example image that i have used for experiment.

Example

Source code in C++ language

Please let me know if you need any more information regarding this topic.

Upvotes: 0

Piglet
Piglet

Reputation: 28974

Good solution: Use illumination so your scene is not dark.

If this is not possible you can increase exposure time and/or gain. Both methods degrade your SNR. Especially with moving people motion blur will become a problem if your exposure time is too high.

Do not just increase image brightness or contrast by software. It makes no difference for your computer, only for you.

Read something about auto exposure algorithms. A well exposed image is neither under nor over exposed. It's histogram should be as broad as possible.

Upvotes: 0

Related Questions