How to deal with sudden changes in illumination intensity in smart video analysis

Source: Internet
Author: User

In the research process of intelligent video analysis systems, especially for some engineering applications, sudden changes in light is a very difficult problem. Although many scholars have made a lot of research on sudden changes in illumination, they have also proposed related illumination-unchanged algorithms (illumination invariant), which provide some ideas for solving such problems. It is generally implemented by calculating the illumination invariant features. The article includes:

1) An illumination invariant change detection algorithm.

2) Bayesian illumination-invariant motion detection.

3) robust and illumination invariant change detection based on linear dependence for surveillance application.

4) reflectance ratio-a photometric invariant for object recognition_iccv93.

5) computing reflectance ratios from an image_pr93.

6) color invariant Edge Detection

7) Learning photometric invariance for object Detection-IJCV2010

8) Making Background Subtraction robust to sudden illumination changes

9) object detection using local difference patterns.

Although the methods in the above papers all claim to have no deformation on the illumination change, many of them are unreliable in reality, and may say that the changes in the slowness of illumination have a certain degree of robustness and accuracy. The complexity of some algorithms is also negotiable (for example, making Background Subtraction robust to sudden illumination changes ).

Based on the actual situation, this paper proposes two methods to solve sudden changes in light. One is a multi-mode background model, but a background reconstruction, I think this should also be the way and train of thought to be applied in the project.

A multi-mode background model is used to establish a background model in multiple environments for a scenario. The algorithm detects environment changes and automatically selects a background model. If the lighting conditions are normal, a background model is recommended to be saved. if the background is dark, a background model is created and saved. If there are multiple situations, multiple background models are created. (There should be many algorithms to deal with the slow illumination changes ).

There are already some common algorithms that can be used to create a background model (such as sobs and vibe) for another background reconstruction idea ). When sudden illumination changes are detected, the background model is reconstructed and the motion is detected. However, in this case, the tricky question is how to judge the change of illumination. Many papers have mentioned that the ratio of foreground pixels to the total image size is used as the basis, then, in practice, the change method often carries a false positive, and the false positive rate is high. This article introduces a way of thinking, and the experiment is also very good, compared with the ratio method has improved a lot.

The idea is as follows: divide the entire image into blocks and count the number of foreground pixels for each block. When the foreground pixels of a block exceed a threshold value, the counter is + 1 and the whole image is traversed in sequence, calculate the counter value. The ratio of the computer calculator to the total number of image blocks. If the ratio is greater than a certain threshold value, the system determines that the light is abrupt.

The core code is as follows:

1) Image Segmentation

// winSize default 32void buildGrid( const Mat& input, vector<Rect>& grid, int winSize=32  ){grid.clear();int height = input.rows;int width = input.cols;Rect rc;for ( int i=0; i

2) calculate the ratio

// winSize default 32, ratio default 1.0/winSizebool isSuddenChange( const  vector<Rect>& grid, Mat& foreground, int winSize=32, double ratio=1.0/32.0){int count = 0;int gridSize = grid.size();for ( int i=0; i<gridSize; ++i ){int nonZero = countNonZero( foreground(grid[i]));double _r = double(nonZero)/(double)(winSize*winSize);//if ( nonZero>32)if ( _r> ratio)count++;}double ratio = (double)count/(float)gridSize;cout<<" NonZero ratio: "<<ratio<<endl;if ( ratio > 0.60 ){imwrite("fore.jpg",foreground);return true;}return false;}

Reprinted please indicate the source: http://blog.csdn.net/kezunhai

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.