Applications
Detecting stationary and moving objects in dense fog.
| Frame No. and Description | Screen Shots |
|---|---|
| The detected objects from dense fog. Left: the original from a normal CCTV camera. Right: the detected result. | |
| The motion of objects is detected and enhanced as red regions in the dense fog. By doing so, the moving object deep into fog can be detected and tracked. | ![]() |
| The second snapshoot of the motion detection of objects in fog. Notice that the details and motion of the object in fog are detected. | ![]() |
| The third snapshoot of the motion detection of objects in fog. In this case the moving direction is different. | ![]() |
| source code in C\C++ |
///TODO: put your more advanced image processing routine here. void fProcessing(const int nCh) {///detecting objects in fog from the nCh channel of video signal signal. int i; ///2a. Get the raw data from the current avi frame. TgImage oImg, DisplayImg; int threshold = 64; ///the theshold to distinguish moving object from background. int err = tgGetCurrentAVIFrame(oImg); if(0==err){ err = tgFogOneFrame(&oImg, threshold, &DisplayImg, nCh); ///to get the moving object detected in the foggy scene, it is not a good idea to use this function to detect moving object in non-foggy scene. int count = tgFogGetNumMvingObj(nCh); if(count>0){ TgRect aRect; for(i=0; i< count; i++){ err = tgGetMvingObj(i, aRect, nCh); if(0==err) {///TODO:: you get the i-th bounding rectangle of moving object as in aRect ; } } } if(DisplayImg.pData) {///TODO:: the returned image data pointered to an inner mem-block that will be managed by the core, don't release it. The best idea is to make your own copy of the raw data if you need to modify them. ; } } } |





