Presentation is loading. Please wait.

Presentation is loading. Please wait.

Optical simulation system for brain waves detection & measurements Mid-term presentation Performed by:Yevgeny Safovich Pilnick Nadav Supervised by:Hen.

Similar presentations


Presentation on theme: "Optical simulation system for brain waves detection & measurements Mid-term presentation Performed by:Yevgeny Safovich Pilnick Nadav Supervised by:Hen."— Presentation transcript:

1 Optical simulation system for brain waves detection & measurements Mid-term presentation Performed by:Yevgeny Safovich Pilnick Nadav Supervised by:Hen Broodney

2 Problem Definition Measure eye vision quality objectively Measure eye vision quality objectively The vision should be measured (almost) without cooperation of the person being examined The vision should be measured (almost) without cooperation of the person being examined

3 Solution Use PC to transmit series of images of different colors at certain frequencies in front of the patient (as a stimulation) Use PC to transmit series of images of different colors at certain frequencies in front of the patient (as a stimulation) Use Electronic device to measure brain waves caused by change of vision Use Electronic device to measure brain waves caused by change of vision Conclude regarding to the patient ’ s vision abilities Conclude regarding to the patient ’ s vision abilities

4 Requirements Images Images 3 pairs of colors: 3 pairs of colors: Blue, Yellow Blue, Yellow Green, Red Green, Red Black, White Black, White Each pair has its own “ blank ” color: the average of the colors in the pair Each pair has its own “ blank ” color: the average of the colors in the pair Steps frequency: 0.5Hz – 10Hz, resolution 1Hz Steps frequency: 0.5Hz – 10Hz, resolution 1Hz dx = The delta between the Monitor output and the electrical pulse output. 0.5ms < dx < 1.5ms dx = The delta between the Monitor output and the electrical pulse output. 0.5ms < dx < 1.5ms

5 Definitions Screen Refresh Rate Screen Refresh Rate Vertical Blank Interval (VBI) Vertical Blank Interval (VBI) DirectDraw DirectDraw Primary Surface Primary Surface Front Buffer Front Buffer Back Buffers Back Buffers Flip Flip Performance counter Performance counter Begin End

6 Solution Algorithm Computer Monitor Video Card Human Brain Waves meter Operator * The red interfaces should be synchronized

7 Timing Computer Monitor Video Card Human Brain Waves meter Operator t t1b t3t4t2t5 0.5ms < |t5 – t3| < 1.5ms |t4 – t3|- We suppose this time does not matter and is taken care of by the “Brain Waves meter” |t3 – t2|- We suppose this interval is negligible |t2 – t1b|- The major problem of the project, discussed below |t5 – t1a|- A problem discussed below t1a

8 Timing: focus Ta = VBI begin Ta = VBI begin Tb = Flip Tb = Flip Tc = Flip Critical time Tc = Flip Critical time Td = Flip End Td = Flip End Te =t1a = Out pulse sent Te =t1a = Out pulse sent Tf = t5 = Out pulse received (~ t1d) Tf = t5 = Out pulse received (~ t1d) Tg = t2 = VBI end Tg = t2 = VBI end Ta Tg Tb Tf Tc Te Time Screen Front Buffer Td

9 Feasibility Testing Testing Screen Sync.: Testing Screen Sync.: The goal is to ensure that the new image is shown at the screen ‘ at the moment ’ the Pulse is sent to the parallel port. The goal is to ensure that the new image is shown at the screen ‘ at the moment ’ the Pulse is sent to the parallel port. Testing Pulse delay: Testing Pulse delay: The goal is to ensure that the time between sending the pulse and receiving (Tf – Te), is negligible The goal is to ensure that the time between sending the pulse and receiving (Tf – Te), is negligible Roundtrip delay testing

10 Synchronization Solution Build two Surfaces in DirectDraw Build two Surfaces in DirectDraw Front (Primary Surface) Front (Primary Surface) Back (Attached Surface) Back (Attached Surface) Use windows priority mechanism to give maximum priority to the process (Real-Time) and worker thread (Critical) Use windows priority mechanism to give maximum priority to the process (Real-Time) and worker thread (Critical) Use DirectDraw to determine VBI begin(t1b) Use DirectDraw to determine VBI begin(t1b) Use DirectDraw to Flip the Surfaces Use DirectDraw to Flip the Surfaces Use Parallel port in order to send output Pulse Use Parallel port in order to send output Pulse Use performance counter to ensure we did not miss the Flip critical time (t1f) Use performance counter to ensure we did not miss the Flip critical time (t1f)

11 Project Blocks Diagram Parallel port Interface Video Interface Run-time Module Parallel port Wrapper (DLPortIO) Video Interface Wrapper (DirectDraw) Database Module Configuration module Main application Module

12 Statistics The next run assumed pulse delay is 5 ms. The application collects maximum and minimum times The next run assumed pulse delay is 5 ms. The application collects maximum and minimum times Implicitly neglected the time it takes for the pulse to be received (Tf-Te). Experiments showed Maximum time of ~0.04 ms RoundTrip. Implicitly neglected the time it takes for the pulse to be received (Tf-Te). Experiments showed Maximum time of ~0.04 ms RoundTrip. Conclusions: Conclusions: We did not miss a single sync. We did not miss a single sync. Most Extreme results show 32.7 microsecond difference (~5.05 ms, ~5.08 ms). Way below requirements Most Extreme results show 32.7 microsecond difference (~5.05 ms, ~5.08 ms). Way below requirements

13 Application screens Main screen Main screen

14 Application screens Menu options Menu options Colors pairs Colors pairs Element type Element type Page layout Page layout

15 Application screens Page configuration Page configuration

16 Application screens Options Options

17 Appendix 1 DirectDraw Interface IDirectDraw7 Interface IDirectDraw7 ::WaitForVerticalBlank( … ) ::WaitForVerticalBlank( … ) Interface IDirectDrawSurface7 Interface IDirectDrawSurface7 ::Flip( … ) ::Flip( … )


Download ppt "Optical simulation system for brain waves detection & measurements Mid-term presentation Performed by:Yevgeny Safovich Pilnick Nadav Supervised by:Hen."

Similar presentations


Ads by Google