Changes between Version 89 and Version 90 of Other/Summer/2023/Latency


Ignore:
Timestamp:
Aug 5, 2025, 11:48:45 PM (7 days ago)
Author:
AYUSH_IYER
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Other/Summer/2023/Latency

    v89 v90  
    1010**Project Goal:** To find the method(s) of reducing latency to a minimum in a unicast camera to computer connection over a network.
    1111== Project Design
    12 [[Image(https://drive.google.com/uc?id=1Dx2j0asE0AsblTYqTj8qi3STBbWDbmOi)]]
     12[[Image(https://www.dropbox.com/scl/fi/mqe53ss7ng4j7y0ff276a/ProjectSetup.png?rlkey=9imm2l5nk9lsi5i8eifnqecow&st=izign9cw&raw=1)]]
    1313
    1414Our camera and LED light is sealed in a box with minimal light.\\
     
    1616
    1717
    18 [[Image(https://cdn.discordapp.com/attachments/840223980811714590/1138531408663552152/TM1000-e1490300173183_reszied.png)]]
     18[[Image(https://www.dropbox.com/scl/fi/bqh7wuerkovib7qzwoq13/TimeMachine.png?rlkey=v4cz7e6m5p697acfl1m2i4ebi&st=3cu4olv1&raw=1)]]
    1919
    2020The Time Machine is equipped with a GPS and uses PPS (Pulse Per Second) and PTP (Precision Time Protocol). \\PPS sends a precise voltage that turns the LED light on at the start of every second.
     
    2727                                     
    2828
    29 [[Image(https://cdn.discordapp.com/attachments/840223980811714590/1138860049666678825/test_area.png)]][[Image(https://cdn.discordapp.com/attachments/840223980811714590/1138860900296699954/camera_light.png)]]
     29[[Image(https://www.dropbox.com/scl/fi/bbrmx18n50t8au3dg1fo3/CameraSetup.png?rlkey=la5ggtycj6bm9lcjwsqq9uqhl&st=hfsq996a&raw=1)]]
     30
     31
     32[[Image(https://www.dropbox.com/scl/fi/jqmcukixw1fqt8qok11nl/CameraLight.png?rlkey=at3nkxf4a5pb8v53yfsry6mwa&st=rm4oz2h3&raw=1)]]
    3033
    3134== Tools Used
     
    4649- Configured the camera and computer’s network settings to communicate on the same IP address as the camera.
    4750
    48 [[Image(https://cdn.discordapp.com/attachments/750525976105975828/1138910624181653615/Screenshot_2023-08-09_145059.png)]]
     51[[Image(https://www.dropbox.com/scl/fi/aiu4s0ui4ns37rgysn5oz/Packets.png?rlkey=i49xng7elzzqix5yzc0ajyyd4&st=t1hhbp62&raw=1)]]
    4952
    5053Packets Shown Above
    51 
    52 **Week 1 presentation: [https://docs.google.com/presentation/d/1WgLttl-gL1IPvtBatBWwfke9rf4txnYGf04_Hy7mANE/edit#slide=id.p]**
    53 
    54 
    55 **Week 2 presentation: [https://docs.google.com/presentation/d/1rk4QhjhJOKQ2Q0PooV-JtUru1SGpYBeEUab7y3EtSyQ/edit#slide=id.p]**
    5654
    5755== Week 3-4
     
    6159- We then encountered a problem of packet data being obscured by camera noise, thus when the LED light turned off, it was impossible to distinguish the packets that made up video footage with no light.
    6260- We then continued creating an environment so that the camera would capture intervals of pitch darkness and the LED’s light.
    63 
    64 [[Image(https://cdn.discordapp.com/attachments/750525976105975828/1138906157164003348/Screenshot_2023-08-09_144607.png)]]
    65 
    66 **Week 3 presentation: [https://docs.google.com/presentation/d/1PPJB0SCb0Y8G04pPQRvMS-2uoILxmxJBSVdZgO7B73c/edit#slide=id.p]**
    6761
    6862== Week 5
     
    8478This week was shortened to a considerable margin to the point where we couldn't make much progress. However, we were able to plan for the following weeks by creating many artificial videos of varying amounts of noise as well as a plan to create histogram to plot the number of occurrences each hex byte appeared in order to visualize how noise affects packets using the Python library Matplotlib. 
    8579
    86 **Week 6 presentation: [https://docs.google.com/presentation/d/1IwPrkkpvbTHO3LuBZ2Umuxp5rz9jwKTqmml3EoJ7wAA/edit]**
    87 
    8880== Weeks 7-8
    8981**Summary
     
    9890Following up on our plan from week 6, we worked on plotting histograms of the hex byte data. This had a rough start as when uploading the artificial videos to the node, the node ended up corrupting the video, making it impossible to use. As a result, we uploaded frames from the video to the node in order to compute it. After this, several histogram scripts were developed, each functioning in a different way. Ultimately, we decided upon creating three separate graphs for each color (RGB) of how often certain values occurred. After testing these with the JPEG images, we then used it on the camera where we changed LED setup to take up more of the camera’s view as well as used FFMPEG to get video into one MJPEG or many JPEG files. The resulting histograms were the following:
    9991
    100 [[Image(https://cdn.discordapp.com/attachments/840223980811714590/1138851957713412226/red_values_resized.png)]]
    101 [[Image(https://cdn.discordapp.com/attachments/840223980811714590/1138852476502691840/green_values_resized.png)]]
    102 [[Image(https://cdn.discordapp.com/attachments/840223980811714590/1138852959699083394/blue_values_resized.png)]]
     92[[Image(https://www.dropbox.com/scl/fi/kesssgcue020okb6fga5w/RedHistogram.png?rlkey=rpb8at1a64mxkb6o67f82tm12&st=dio31y9p&raw=1)]]
    10393
    104 **Noise Histogram**
     94[[Image(https://www.dropbox.com/scl/fi/kesssgcue020okb6fga5w/GreenHistogram.png?rlkey=rpb8at1a64mxkb6o67f82tm12&st=4ihfcpq8&raw=1)]]
    10595
    106 [[Image(https://cdn.discordapp.com/attachments/840223980811714590/1138853467121782784/noise_histogram_resized.png)]]
     96[[Image(https://www.dropbox.com/scl/fi/hjuzbi151ay8jrearglmf/BlueHistogram.png?rlkey=prjcru8knn7a9dplwuomrzb50&st=gfatiyyi&raw=1)]]
    10797
    10898These histograms show the number of occurrences in the 5-sec camera footage for each type of colored pixel value with no noise.
     
    112102          - The occurrences of blue pixel values is significantly higher because the LED emits blue light.
    113103
    114 The RGB histograms were made without noise, compared to the histogram on the bottom when there was significant amount of noise present. These results show that the amount of noise in our camera can heavily affect our data set.
    115 
    116 **Week 7 presentation: [https://docs.google.com/presentation/d/1oPe0z3FzBUPzzFf-zcCJgz43jQIHqMHRg1BsnYJdaCU/edit]**
    117 
    118 **Week 8 presentation: [https://docs.google.com/presentation/d/1qZLdapSWYrYTItAQqAmdhgF34x_hxIMOjZ_adv8LDIg/edit]**
     104The RGB histograms were made without noise, showing that the amount of noise in our camera can heavily affect our data set.
    119105
    120106== Week 9
     
    127113During this week, we decided to take a step back to understand what the values in the JPEG hex values meant. Once analyzing the hex files from the video, it was quickly discovered there were certain indicators present, being FFD8 and FFD9. FFD8 represented the start of frame while FFD9 represented the end of the frame, while everything inside containing the frame contents. Knowing this, we were then able to isolate specific frames via these indicators via a Python script.
    128114
    129 [[Image(https://cdn.discordapp.com/attachments/750525976105975828/1138556198992494683/Hexdata.png)]]
     115[[Image(https://www.dropbox.com/scl/fi/qzkasgiccwcepr8lbcl1t/HexFrameValues.png?rlkey=px8ewjontnvg8ndavguhkgumn&st=6zwvh9pa&raw=1)]]
    130116
    131117After this step, we were finally able to calculate latency. By comparing the frame data to the packet data, we could find what exact packet correlates to the frame. By using the timestamp of the packet, we can then be able to find the latency.
     
    142128**Week Run-through
    143129
    144 When it came down to our final week of the project, it mainly revolved around finalizing the presentation and poster.
     130When it came down to our final week of the project, it mainly revolved around finalizing our final presentation and poster.
    145131
    146132**Week 10 presentation: [https://docs.google.com/presentation/d/1si5gw012hevYePNOeTQiqYPRlw_s4Ao4pM_46wUkApk/edit#slide=id.p]**
     
    149135**Artificial Video Maker (Needs OpenCV and numpy)**
    150136
    151 [[Image(https://cdn.discordapp.com/attachments/750525976105975828/1160958133091450930/Screenshot_2023-10-08_121414.png?ex=65368d84&is=65241884&hm=8df6f0af9e582ef9e82b94be89ca13a12c37d6da43880b9627ea2d05378a0ba3&)]]
     137[[Image(https://www.dropbox.com/scl/fi/6ohvt40byznxhjegwuh5c/ArtificalVideoMaker.png?rlkey=jmoxv9ybw6h1rikc3rlq0ff8d&st=duhx5gmx&raw=1)]]
    152138
    153139**Frame Collector (Needs OpenCV, OS, Shutil, and numpy)**
    154140
    155 [[Image(https://cdn.discordapp.com/attachments/750525976105975828/1160958134165188799/Screenshot_2023-10-08_123014.png?ex=65368d84&is=65241884&hm=a5762a9b6f87531edfd46cce8362097377d433d27c74ffcbaa97795aafdb294b&)]]
     141[[Image(https://www.dropbox.com/scl/fi/poriu59x10b1nbn6ym66v/FrameCollector.png?rlkey=dkd2mac14lbc0ib1e4lh8fgzk&st=vgnp6zus&raw=1)]]
    156142
    157143**Histogram Code (Needs OpenCV, numpy, and Matplotlib)**
    158144
    159 [[Image(https://cdn.discordapp.com/attachments/750525976105975828/1160958133871591434/Screenshot_2023-10-08_122714.png?ex=65368d84&is=65241884&hm=0a09fc89f87ea4a525f1db17d24a643771040f77638140cee75827a4c30cb2fd&)]]
     145[[Image(https://www.dropbox.com/scl/fi/7ff36l642d7h30y47sw63/HistogramCode.png?rlkey=betupkn7zvhtvxjn175m9ctyx&st=u6g2oa3z&raw=1)]]
    160146
    161147**Framefinder**
    162148
    163 [[Image(https://cdn.discordapp.com/attachments/750525976105975828/1160958134479765666/Screenshot_2023-10-08_123207.png?ex=65368d84&is=65241884&hm=91662810f3b2035947084d46dd1653b3e628a252469a1c2e0cf28ec85a2abdf8&)]]
     149[[Image(https://www.dropbox.com/scl/fi/lekmsfzf72xw5covj8kmg/Framefinder.png?rlkey=p6ar9pbx98ooq9dcbnaa21t61&st=oauqi1pg&raw=1)]]
    164150
    165151**Frame and Packet Comparison**
    166152
    167 [[Image(https://cdn.discordapp.com/attachments/750525976105975828/1160958133536043069/Screenshot_2023-10-08_122421.png?ex=65368d84&is=65241884&hm=1ac20f07b0d8da615ced98e1d70c1a994bcfd8196af5b58ae7553eb08cd583ca&)]]
     153[[Image(https://www.dropbox.com/scl/fi/k3ctv8px7uy9ti5uagy48/FramePacketComparison.png?rlkey=ud0228iz20drd0wa1e8kc8k6p&st=qyuesngv&raw=1)]]