<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: FishFind</title>
    <description>The latest articles on DEV Community by FishFind (@fishfinduk).</description>
    <link>https://dev.to/fishfinduk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4249134%2Fbbe4b3e3-3334-4987-90a2-db3e035e50dd.png</url>
      <title>DEV Community: FishFind</title>
      <link>https://dev.to/fishfinduk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fishfinduk"/>
    <language>en</language>
    <item>
      <title>Underwater USB Camera Capture on Linux: OpenCV Notes From Pier Tests</title>
      <dc:creator>FishFind</dc:creator>
      <pubDate>Tue, 17 Nov 2026 07:20:16 +0000</pubDate>
      <link>https://dev.to/fishfinduk/underwater-usb-camera-capture-on-linux-opencv-notes-from-pier-tests-31i9</link>
      <guid>https://dev.to/fishfinduk/underwater-usb-camera-capture-on-linux-opencv-notes-from-pier-tests-31i9</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I help with FishFind, a UK brand building portable underwater fishing cameras. This post is a practical engineering walkthrough of a live-view pipeline hobbyists and firmware-curious anglers can reproduce. It is not a product brochure.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have ever lowered a camera into a canal on a grey UK afternoon, you already know the hard part is not getting a picture. The hard part is getting a usable picture: low light, moving water, cable noise, a small screen that washes out in daylight, and a battery that dies while you are still deciding whether the margin is clean.&lt;/p&gt;

&lt;p&gt;This tutorial walks through a minimal live-view pipeline you can build or reason about when you work with a portable underwater camera: capture, transport, display, low-light assist, and field ops. The goal is reproducible thinking, not a shopping list.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a pipeline mindset helps
&lt;/h2&gt;

&lt;p&gt;Treat the system as stages with clear interfaces:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sensor and optics behind a waterproof housing&lt;/li&gt;
&lt;li&gt;Illumination from ambient light plus IR LEDs for dusk and dawn&lt;/li&gt;
&lt;li&gt;Transport over a cable from camera to display&lt;/li&gt;
&lt;li&gt;Decode and render into a framebuffer or video sink&lt;/li&gt;
&lt;li&gt;Human factors such as brightness, shade, cable handling, rinse and dry&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When something looks wrong, ask which stage failed. Murky water is not a broken decoder. A washed-out LCD is not a bad CMOS module. A flickering feed after a kinked cable is not the algorithm.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 1 — Capture assumptions
&lt;/h2&gt;

&lt;p&gt;A bank-side underwater camera usually assumes short working distance, variable turbidity after rain or silt, operator motion from hand lowering or boat drift, and temperature swings that affect battery and seals.&lt;/p&gt;

&lt;p&gt;For experimentation on land, a USB UVC webcam is a useful stand-in for the software path even if the waterproof module differs. On a Raspberry Pi or Linux laptop you can prove the display and recording path before you care about housing ratings.&lt;/p&gt;

&lt;p&gt;List capture devices and open a preview with OpenCV:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;v4l2-ctl --list-devices
python3 - &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s1"&gt;'PY'&lt;/span&gt;
import cv2
cap &lt;span class="o"&gt;=&lt;/span&gt; cv2.VideoCapture&lt;span class="o"&gt;(&lt;/span&gt;0&lt;span class="o"&gt;)&lt;/span&gt;
ok, frame &lt;span class="o"&gt;=&lt;/span&gt; cap.read&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
print&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"opened"&lt;/span&gt;, ok, None &lt;span class="k"&gt;if&lt;/span&gt; not ok &lt;span class="k"&gt;else&lt;/span&gt; frame.shape&lt;span class="o"&gt;)&lt;/span&gt;
cap.release&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
PY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If opened is false, fix permissions, cable, or device index before inventing image-processing excuses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 2 — A minimal Python preview loop
&lt;/h2&gt;

&lt;p&gt;A first useful loop is intentionally boring: grab frames, optionally resize for a small screen, show FPS, quit cleanly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;cv2&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;640&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;480&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;cap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VideoCapture&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;cap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;CAP_PROP_FRAME_WIDTH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;cap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;CAP_PROP_FRAME_HEIGHT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;cap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isOpened&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;SystemExit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"cannot open camera"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;frames&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="n"&gt;t0&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;
        &lt;span class="n"&gt;frames&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="n"&gt;elapsed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;t0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1e-6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;fps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;frames&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;elapsed&lt;/span&gt;
        &lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;putText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{fps:.1f} fps"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;FONT_HERSHEY_SIMPLEX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;imshow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"underwater-preview"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;waitKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="mh"&gt;0xFF&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"q"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;

    &lt;span class="n"&gt;cap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;release&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroyAllWindows&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"__main__"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why start here? Every later enhancement such as gain, denoise, recording, or OSD needs a stable grab path. If the basic loop stutters, profile I/O before adding neural denoise fantasies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 3 — Exposure and gain without fooling yourself
&lt;/h2&gt;

&lt;p&gt;Underwater scenes are often dark and low-contrast. Auto-exposure can hunt. Manual or semi-manual control is easier when comparing before and after IR.&lt;/p&gt;

&lt;p&gt;With V4L2 controls (names vary by device):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;v4l2-ctl -d /dev/video0 --list-ctrls
v4l2-ctl -d /dev/video0 --set-ctrl=exposure_auto=1
v4l2-ctl -d /dev/video0 --set-ctrl=exposure_absolute=400
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Practical field rule: raise exposure until motion blur becomes unacceptable, then add light rather than pushing digital gain into snow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 4 — Infrared assist as an engineering feature
&lt;/h2&gt;

&lt;p&gt;IR LEDs help when ambient light collapses. They are not magic. In coloured floodwater you still get brown soup. In clearer dusk water you often get usable structure: weed edges, bait, hard versus soft bottom.&lt;/p&gt;

&lt;p&gt;When you prototype illumination, keep LEDs out of the lens glare path as much as the housing allows, prefer even flood over a hot spot that blooms the sensor, and test with honest turbidity. A bucket of tea-stained water is ugly but useful.&lt;/p&gt;

&lt;p&gt;If you log frames for later analysis, record whether IR was on. Otherwise you will improve an algorithm that was actually just better lighting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 5 — Transport and cable reality
&lt;/h2&gt;

&lt;p&gt;Many portable kits use a long tether. Electrically and mechanically that tether is the weak link people underestimate.&lt;/p&gt;

&lt;p&gt;Engineering habits that transfer to product thinking include strain relief at both ends, avoiding sharp bends and car-door crushes, rinsing after canal or harbour sessions, drying connectors, and keeping coil discipline so wind on a pier does not create a knot mid-session.&lt;/p&gt;

&lt;p&gt;If you are building a digital link such as USB extension, Ethernet, or custom serial video, measure packet loss under motion. A lab bench with a stationary camera will not reveal intermittent faults that only appear when the cable flexes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 6 — Display human factors
&lt;/h2&gt;

&lt;p&gt;A compact screen is portable because it is small. Small screens wash out in British midday glare. Before rewriting shaders, shade the panel with your body, bivvy, or hand, angle away from specular sun, then adjust brightness.&lt;/p&gt;

&lt;p&gt;Also print on-screen state that matters outdoors: IR on or off, battery estimate, recording state. A missed recording-off indicator wastes a session more often than a missing colormap.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 7 — Optional recording for review
&lt;/h2&gt;

&lt;p&gt;Recording helps you review turbidity and bait behaviour later, and it is invaluable when debugging firmware.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;cv2&lt;/span&gt;

&lt;span class="n"&gt;cap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VideoCapture&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;fourcc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VideoWriter_fourcc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="s2"&gt;"MJPG"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;out&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VideoWriter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"swim.avi"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fourcc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;20.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;640&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;480&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;
    &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;imshow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"rec"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;waitKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="mh"&gt;0xFF&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"q"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;

&lt;span class="n"&gt;cap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;release&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;release&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;cv2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroyAllWindows&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Store a sidecar text note with venue, weather, IR state, and depth estimate. Future-you will thank present-you.&lt;/p&gt;

&lt;h2&gt;
  
  
  A reproducible session checklist for developers
&lt;/h2&gt;

&lt;p&gt;Use this as a definition of done for field tests:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Device enumerates with v4l2-ctl&lt;/li&gt;
&lt;li&gt;Preview FPS stays stable for 60 seconds on land&lt;/li&gt;
&lt;li&gt;Preview stays stable after a cable flex test&lt;/li&gt;
&lt;li&gt;IR on and off visibly changes a dark scene&lt;/li&gt;
&lt;li&gt;Battery lasts for the planned session length plus twenty percent&lt;/li&gt;
&lt;li&gt;After rinse and dry, the next power-on still enumerates&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If step three fails, stop polishing UI.&lt;/p&gt;

&lt;h2&gt;
  
  
  What good enough looks like for UK venues
&lt;/h2&gt;

&lt;p&gt;On a canal shelf check, confirm clean presentation spots versus soft silt. On a carp margin, inspect weed density before committing casts. Around pier pilings, inspect structure and fouling before losing tackle. In low light, IR should be usable enough to distinguish open bottom from weed.&lt;/p&gt;

&lt;p&gt;You do not need cinematic colour. You need decision-quality structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure modes worth documenting
&lt;/h2&gt;

&lt;p&gt;Write them down when they happen: silt bloom after aggressive lowering, auto-exposure pumping under IR, intermittent black frames when the cable twists, condensation inside the housing, and file write failures on a full card. A short failure log beats a long thread of sometimes it glitches.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting the stages together on a short evening session
&lt;/h2&gt;

&lt;p&gt;A realistic developer-and-angler evening looks like this. Arrive and prove the capture path on land for thirty seconds. Lower the camera gradually and stop when silt appears. Toggle IR once in a shaded pocket of water. Decide whether the swim is clean enough. Fish the spot or move. Rinse, dry, and note one failure if anything misbehaved.&lt;/p&gt;

&lt;p&gt;That rhythm keeps the pipeline honest. You are not filming a documentary. You are verifying that each stage still works under the only conditions that matter: cold hands, flat light, dirty water, and limited time after work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;A portable underwater camera is a systems problem dressed as a fishing accessory. If you keep the pipeline explicit — capture, light, transport, display, ops — you can debug faster whether you are writing Python on a Pi or shipping a sealed consumer unit.&lt;/p&gt;

&lt;p&gt;If you want the product context behind the UK-focused live-view gear I work on, the homepage is &lt;a href="https://fishfind.co.uk/" rel="noopener noreferrer"&gt;https://fishfind.co.uk/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Questions welcome, especially war stories about UVC quirks, IR bloom, or long-tether noise in the field.&lt;/p&gt;

&lt;h2&gt;
  
  
  Extra field notes for first-time builders
&lt;/h2&gt;

&lt;p&gt;When you first take a prototype outdoors, bring a notebook even if you hate notebooks. Write the time, weather, water colour, IR state, and one sentence about what the image was good for. After five sessions you will see patterns that no lab test revealed: which cable coil habit survives pier wind, which brightness setting survives noon glare, and which exposure value stops hunting when IR turns on.&lt;/p&gt;

&lt;p&gt;Also separate product questions from software questions. If the image is unusable because the housing flooded, that is not an OpenCV bug. If the image is soft because the lens is scratched by grit, that is not a neural sharpening opportunity. Fix the physical stage first. Software should not compensate for a dirty window when a microfibre cloth and better rinse habit solve it in ten seconds.&lt;/p&gt;

&lt;p&gt;Finally, share reproducible commands when you ask for help. Paste the v4l2 device list, the exact OpenCV open call, FPS observed, and whether the failure happens on land or only underwater. That detail turns a vague glitch report into something another developer can answer.&lt;/p&gt;

</description>
      <category>iot</category>
      <category>linux</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
