by Brendan Silva
Version 2 (April 23, 2025)
Download (23 downloads)
This flowchart uses FFmpeg to attempt to detect changes in the environment by comparing pixels of camera-captured images over time. This is not a motion detector. The first image taken is used as a reference for all subsequent comparisons.
With the appropriate adjustments, it is possible to determine when the inside of a container is full or empty without the need for a scale or float valve, as long as its contents contrast with the background. It can also tell whether a group of objects is arranged in a desired way on a shelf, table, or inside a box.
โโโ ๐๐ป๐๐๐ฎ๐น๐น ๐๐๐บ๐ฝ๐ฒ๐ด๐๐ถ โโโ
๐ฅ Download FFmpegui (ID: org.ffmpeg.gui), version 2.23. Itโs free and ad-free:
https://play.google.com/store/apps/details?id=org.ffmpeg.gui
After installing, open the app, tap the three dots (top-right) to access the menu, go to Settings, then enable "Use custom version of ffmpeg". Wait for FFmpeg to download.
โโโ ๐๐ผ๐ ๐๐ผ ๐๐๐ฒ โโโ
โ Make sure the camera is perfectly still. Use a tripod or phone stand to avoid shaking. Angle, distance, and lighting must remain consistent between captures for meaningful comparisons.
โ Point the camera at the area you want to monitor, run the flow, and adjust the threshold and tolerance:
โฆ Threshold defines the minimum brightness difference between pixels to consider them changed. Hue changes are ignored. So, for example, it doesn't matter if an object is blue or red, as long as both colors have similar brightness and are under the same lighting.
โฆ Tolerance defines the maximum percentage of pixel differences allowed before a change is detected. If it's too hard to find a working threshold, try increasing this value.
โ Once configured, FFmpegui and the camera will work alongside Automate. When a change is detected according to your settings, a beep will sound. You may edit this flow to do anything you like, such as launching another flow with the "Flow start" block.
โโโ ๐๐ถ๐บ๐ถ๐๐ฎ๐๐ถ๐ผ๐ป๐ โโโ
โ ๏ธ The character limit for community descriptions doesn't allow me to include the full instructions here. Please pay attention to the notes in the "Adjustments" window when you run this flowchart. Theyโre at the bottom of the page, so scroll up to see them.
โโโโโโ
Tags: adjustment, af2b, analysis, android, app, applications, apps, attention, automate, automation, bi-temporal, binary, camera, capture, change, changes, channel, comparison, component, decoder, detection, difference, differences, different, diy, encoder, environmental, experiments, extraction, ffmpeg, ffmpegui, frame, fusion, image, imagery, images, improvement, information, interaction, mechanism, method, model, module, monitoring, motion, object, observation, pixel, pixel-level, processing, resolution, scene, search, segmentation, sensing, statistical, surface, tech, temporal, threshold, tips, transformation, transformation-based, tricks, vision, visual
๐๐ฆ ๐ต๐๐๐๐๐๐ ๐๐๐๐ฃ๐
โฅ https://www.buymeacoffee.com/brendansilva