360 likes | 493 Views
Automated Cognitive Assessment of Piglets through Eye Blink Conditioning. Group 36 Darren Chen, Neil Sarwal , James Sangmok Yun ECE 445 Senior Design May 5, 2014. Introduction.
E N D
Automated Cognitive Assessment of Piglets through Eye Blink Conditioning Group 36 Darren Chen, Neil Sarwal, James Sangmok Yun ECE 445 Senior Design May 5, 2014
Introduction • Present a solution to test the cognitive development of piglets through classical conditioning and the “eye blink paradigm”. • Study the effects of animal nutrition on permanent changes in neurodevelopmental patterns for piglets
Features • Camera/Lighting • Linux Hub/Display • Tone Delivery • Air Puff Delivery • Expandable, Modular Design
ODROID + Modules Power Input Monitor Logitech C910 Buzzer Keyboard, Mouse, Camera Boost Converter + Relays LED Lighting
System Overview • Hardware • Boost Converter/Electronic Valve • LED Lighting • Buzzer • Software • ODROID XU-Lite • Interface/Communication with Modules • Image Processing
Hardware Overview/Requirements • Boost Converter/Electronic Valve • Takes 5Vdc from ODROID adapter and converts to stable 12Vdc for use with the electronic valve for air puff delivery • LED Lighting • Provides ample light around the camera for clear monitoring • Buzzer • Accepts a 5-12Vdc and produces a tone, signaling the start of the trial
Boost Converter • RLC Circuit, output controlled by a relay • Pulse Generator powering the relay • Boosted voltage powers the Electronic Valve in air puff delivery
Boost Converter – Pulse Generator – Schematic VCC Reset Discharge Trigger Threshold Control Output GND
Boost Converter – LED Lighting • Using white LED’s, to allow minimal color/gradient distortion in video feed • Hole to be cut to fit the camera • Brightness controlled manually via trimpot
Boost Converter – Buzzer • Powered by DC voltage • Produces a ~70dB tone to signal the trial beginning
Software Overview/Requirements • ODROID XU-Lite • Central Hub for all attached modules and software • Interface with Modules • Using GPIO pins on the Odroid, send signals to relays controlling the modules • Timing of activation of modules in accordance with the Eye Blink Paradigm • Image Processing • Eye blink detection algorithm
650 ms Delay Paradigm 600 ms Start Tone Start Airpuff 100 ms End Tone/Airpuff Intertrial interval Correlation EyeBlink Detection Period Checkpoint Startle Response Period Time (ms)
C++ code Overview • Turn on LED • Capture Base Image/Calibration • Session while loop (until 20 trials){ Intertrial Period, randomly generated 20-40 seconds Recapture Base Image if needed Start Tone, 100ms sleep time for startle period Start Eyeblink Detection algorithm End detection by timing 600msoutput blink confirmation, start airpuff valve Sleep 50ms End Valve, Tone, Trial }
Timing average per trial using Timestamp() • Total Numbers: 50 • Mean: 0.67849 Seconds • Standard Deviation: 0.00522 seconds • Consistently about 28 ms off of what we want • Due to video processing and while loop configuration • Potential solution: Smarter timing configuration Account for processing delay within code
Verification via Oscilloscope X Axis intervals: 100.0ms Y Axis intervals: 1.00V dX = 675.000 ms dY = 1.8000V
Eye Blink Algorithm Overview • Uses a base image every trial period • Appropriate histograms are displayed throughout process • Compares histograms during critical points of the Eye Blink Paradigm • Comparison between base histogram and eye blink histogram is initiated • Correlation is used to compare histograms to pre-set threshold to determine eye blink
Acquiring the Histograms • Separate helper function is used • Algorithm is defined as: • Set histogram bin count and range • Create Matrix for histogram • Calculate histogram for each frame • Visualize each bin • Return the histogram matrix
Acquiring the Base Image If the histogram is too different or too similar then the previous base histogram and by extension the image is kept.
Determining Eye Blink OpenCV’s compareHist function will compare the base histogram to the eye blink histogram. Crossing the threshold of .8 will indicate an eye blink
Challenges/Problems • Boost Converter • Prolonged use results in decreasing efficiency • High current load causes components to overheat • Divide current load with alternative circuit design
Future Hardware Development • Develop better methods of powering the air puff delivery • Scale modules up to 12 test trials at once • Secure mounting on the piglet’s mask
Future Software Development • Develop a more user-friendly interface • Allow free control of timing between each module • Port data and display to a separate PC • Increase accuracy of eye blink detection
Credits • Prof. Paul Scott Carney • Prof. Andrew C. Singer • Prof. Ryan Neil Dilger • Mr. Austin Mudd • Mr. Kevin Chen
Thank You Darren Chen, Neil Sarwal, James Sangmok Yun