+ All Categories
Home > Documents > Department of Computer Science & Engineering Background Subtraction Algorithm for the Intelligent...

Department of Computer Science & Engineering Background Subtraction Algorithm for the Intelligent...

Date post: 12-Jan-2016
Category:
Upload: sherman-robertson
View: 213 times
Download: 0 times
Share this document with a friend
Popular Tags:
1
Department of Computer Science & Engineering Background Subtraction Algorithm for the Intelligent Scarecrow System Francisco Blanquicet, Mentor: Dr. Dmitry Goldgof 1. Introduc tion The Intelligent Scarecrow System (Figure 1) was designed by four Computer Engineering undergraduate students at the University of South Florida. It is intended to help minimize fish losses in fish farms, and prevent the killing of wading birds such as the blue heron (Figure 2) and the white egret (Figure 3), which are typical predators of fish in Florida. This Scarecrow safely deters birds from fish farms by scaring them away using pre-programmed sounds, and water cannons that are controlled by an eBox-II microcomputer (Figure 4). Motivation: The system uses a network camera and an image processing algorithm running on the eBox-II to detect intruders, but the current system’s image algorithm is not robust and does not have the necessary tools to accurately recognize birds. Objective: The main objective of this project is to extend the capabilities of the system’s image processing algorithm. This new extension to the algorithm introduces a background subtraction technique that will pave the way to make the recognition of birds possible in future system updates. [Figure: 1] [Figure: 2] [Figure: 3] Speaker Internet W ater C annon W ater C annon IP C am era Speaker eB ox II Fish Pond H eron [Figure: 4] 2. Methodol ogy Two background subtraction algorithms were written and tested. The second algorithm averages the pixels of consecutive images. The resulting images were recorded after each subtraction. The pseudo-code for each algorithms is presented here, including the current system’s algorithm as well as the resulting images. Current System’s Algorithm Pseudo-code Input: RefImg, NextImg Variables: OrangeThreshold, DiffPixelCount, SubImg Start Sum pixels in RefImg If amount of pixels in RefImg > OrangeThreshold Grab another RefImg from the Camera Go back to Start Else Retrieve NextImage from camera SubImg = NextImg – RefImg Sum pixels in SubImg If sum of pixels in SubImg > DiffPixelCount Activate water cannons and play programmed sounds Else Do nothing Go back to Start 3. Results Background Subtraction Algorithm-1 Pseudo-code Input: RefImg, NextImg Variables: R_PixVal, G_PixVal, B_PixVal, SubImg Start Grab RefImg from camera Wait 100 milliseconds Grab NextImg from camera SubImg = NextImg – RefImg Generate three histograms for the red, green, and blue color components of each pixel R_PixVal = red pixel value with highest frequency in red_histogram G_PixVal = green pixel value with highest frequency in green_histogram B_PixxVal = blue pixel value with highest frequency in blue_histogram FilterImage(SubImg, R_PixVal, G_PixVal, B_PixVal) Remove pixels that are <= (R_PixVal+40) and (G_PixVal+40) and (B_PixVal+40) If there is an object still in the image Check color and shape of object(s) to determine if it is a bird. //(Future Work) Else go back to Start Background Subtraction Algorithm-2 Pseudo-code Input: RefImg, NextImg Variables: R_PixVal, G_PixVal, B_PixVal, SubImg, Counter = 1 Start Grab RefImg from camera Loop Begins Grab NextImg from camera SubImg = NextImg – RefImg Generate three histograms for the red, green, and blue color components of each pixel R_PixVal = red pixel value with highest frequency in red_histogram G_PixVal = green pixel value with highest frequency in green_histogram B_PixxVal = blue pixel value with highest frequency in blue_histogram FilterImage(SubImg, R_PixVal, G_PixVal, B_PixVal) Remove pixels that are <= (R_PixVal+40) and (G_PixVal+40) and (B_PixVal+40) If there is an object still in the image Check color and shape of object(s) to determine if it is a bird. //(Future Work) Counter = 1 go back to Start Else RefImg = (RefImg + NextImg) / Counter Counter = Counter + 1 Go back to Loop Begins Background Subtraction Algorithm-1 Pseudo-code Cont’d. Nois e 4. Conclusi ons The processed images presented here show that the introduction of a background subtraction algorithm helps in recognizing the birds. Algorithm-1 (Figure 13) shows a resulting image with some noise. Algorithm- 2 (Figure 22) shows a resulting image without noise. More research is needed in order to implement a shape recognition algorithm that can use the output of the background subtraction algorithms to recognize different birds. 5.Acknowled gements I would like to thank Dr. Dmitry Goldgof, Dr. Sudeep Sarkar, Dr. Henry Jeanty, and Dr. Miguel Labrador for their help, guidance, and support during this research project. [Figure: 5] [Figure: 6] [Figure: 7] [Figure: 8] [Figure: 9] [Figure: 10] [Figure: 11] [Figure: 12] [Figure: 13] [Figure: 14] [Figure: 15] [Figure: 16] [Figure: 17] [Figure: 18] [Figure: 19] [Figure: 20] [Figure: 21] [Figure: 22] [Figure: 23] [Figure: 24]
Transcript

Department of Computer Science & Engineering

Background Subtraction Algorithm for the Intelligent Scarecrow System

Francisco Blanquicet, Mentor: Dr. Dmitry Goldgof1. Introduction

•The Intelligent Scarecrow System (Figure 1) was designed by four Computer Engineering undergraduate students at the University of South Florida.

•It is intended to help minimize fish losses in fish farms, and prevent the killing of wading birds such as the blue heron (Figure 2) and the white egret (Figure 3), which are typical predators of fish in Florida.

•This Scarecrow safely deters birds from fish farms by scaring them away using pre-programmed sounds, and water cannons that are controlled by an eBox-II microcomputer (Figure 4).

•Motivation: The system uses a network camera and an image processing algorithm running on the eBox-II to detect intruders, but the current system’s image algorithm is not robust and does not have the necessary tools to accurately recognize birds.

•Objective: The main objective of this project is to extend the capabilities of the system’s image processing algorithm. This new extension to the algorithm introduces a background subtraction technique that will pave the way to make the recognition of birds possible in future system updates.

[Figure: 1] [Figure: 2] [Figure: 3]

Speaker

Internet

Water Cannon Water Cannon

IP Camera

Speaker

eBox II

Fish Pond Heron

[Figure: 4]

2. Methodology

Two background subtraction algorithms were written and tested. The second algorithm averages the pixels of consecutive images. The resulting images were recorded after each subtraction. The pseudo-code for each algorithms is presented here, including the current system’s algorithm as well as the resulting images.

•Current System’s Algorithm Pseudo-codeInput: RefImg, NextImg

Variables: OrangeThreshold, DiffPixelCount, SubImg

StartSum pixels in RefImgIf amount of pixels in RefImg > OrangeThreshold Grab another RefImg from the Camera Go back to StartElse Retrieve NextImage from camera SubImg = NextImg – RefImg Sum pixels in SubImg If sum of pixels in SubImg > DiffPixelCount Activate water cannons and play programmed sounds Else Do nothingGo back to Start

3. Results

•Background Subtraction Algorithm-1 Pseudo-codeInput: RefImg, NextImg

Variables: R_PixVal, G_PixVal, B_PixVal, SubImg

StartGrab RefImg from cameraWait 100 millisecondsGrab NextImg from cameraSubImg = NextImg – RefImgGenerate three histograms for the red, green, and blue color components of each pixelR_PixVal = red pixel value with highest frequency in red_histogramG_PixVal = green pixel value with highest frequency in green_histogramB_PixxVal = blue pixel value with highest frequency in blue_histogram

FilterImage(SubImg, R_PixVal, G_PixVal, B_PixVal) Remove pixels that are <= (R_PixVal+40) and (G_PixVal+40) and (B_PixVal+40)

If there is an object still in the image Check color and shape of object(s) to determine if it is a bird. //(Future Work)Else go back to Start

•Background Subtraction Algorithm-2 Pseudo-codeInput: RefImg, NextImg

Variables: R_PixVal, G_PixVal, B_PixVal, SubImg, Counter = 1

StartGrab RefImg from cameraLoop BeginsGrab NextImg from cameraSubImg = NextImg – RefImgGenerate three histograms for the red, green, and blue color components of each pixelR_PixVal = red pixel value with highest frequency in red_histogramG_PixVal = green pixel value with highest frequency in green_histogramB_PixxVal = blue pixel value with highest frequency in blue_histogram

FilterImage(SubImg, R_PixVal, G_PixVal, B_PixVal) Remove pixels that are <= (R_PixVal+40) and (G_PixVal+40) and (B_PixVal+40)

If there is an object still in the image Check color and shape of object(s) to determine if it is a bird. //(Future Work) Counter = 1 go back to StartElse RefImg = (RefImg + NextImg) / Counter Counter = Counter + 1 Go back to Loop Begins

•Background Subtraction Algorithm-1 Pseudo-code Cont’d.

Noise

4. Conclusions

The processed images presented here show that the introduction of a background subtraction algorithm helps in recognizing the birds. Algorithm-1 (Figure 13) shows a resulting image with some noise. Algorithm-2 (Figure 22) shows a resulting image without noise.More research is needed in order to implement a shape recognition algorithm that can use the output of the background subtraction algorithms to recognize different birds.

5.Acknowledgements

I would like to thank Dr. Dmitry Goldgof, Dr. Sudeep Sarkar, Dr. Henry Jeanty, and Dr. Miguel Labrador for their help, guidance, and support during this research project.

[Figure: 5]

[Figure: 6]

[Figure: 7] [Figure: 8] [Figure: 9]

[Figure: 10] [Figure: 11] [Figure: 12]

[Figure: 13] [Figure: 14] [Figure: 15]

[Figure: 16] [Figure: 17]

[Figure: 18] [Figure: 19]

[Figure: 20] [Figure: 21] [Figure: 22] [Figure: 23] [Figure: 24]

Recommended