looped start video recording (when there is motion) and stop video recording (when there is no motion) through image acquisition(maybe image processing)

1 次查看(过去 30 天)
I have an expermiental setup that I want to fully control through MATLAB. I am working on silos. I have a small scale silo which flips with stepper motor and Arduino Uno R3 (pictures attached). I can control stepper motor connected to Arduino through MATLAB (code file attached) to flip the silo (half turn and half turn) now I want to record video with a camera (pic attached).
I want to record whenever my silo is flipped and stop recording when the silo is empty then tell Arduino to flip the silo again and start the video again(this in a loop). Many times the silo clogs and jams. (I have uploaded the video of the setup working and the clogging events for more clarity)
I am stuck at the part on how do I tell if the silos empty or just jammed and how do I use this information to start and stop the recording and flip the silo.
Initially I was thinking that I can use like binary or greyscale values in the vertical direction (to avoid clogging scenario) of outlet region to figure out if silo is empty. But I am still a novice at MATLAB I need help on how to implement these triggers of flipping silo then starting video and checking if silo is empty then stopping the video in a loop.
Any help is appreciated in this issue.
Umair Rehman Raffi

回答(1 个)

Ranjeet 2023-5-5
Hi Umair,
Your problem state confines to creating a binary classifier (2 classes) for empty and non-empty classes based on image data. You can follow these steps to create one:
  1. This step is image dataset creation since you have to detect empty Vs non-empty silo. Capture at-least 1000 images with approximately equal “empty silo” and “non-empty silo” images. Try to capture different scenarios of non-empty cases.
  2. Use Image labeller to label your images into two said classes. (image labeller)
  3. This Classification example with mobilenetv2 network can be used with the created dataset to fine tune the network. Alternatively, SVM-based classification can also be tried.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by