hello everyone,
we have two frames of a video which has been take from a target shoot paper. Our goal is to detect new bullet holes from these frames.
i have uploaded my samples and you can download it from here -> "http://s9.picofile.com/file/8321113492/ ... e.rar.html" or from https://ufile.io/yc4ri.
Any suggestion is very helpful and i'm waiting for your contribution.
best regards
change detection in two frames of a video
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: change detection in two frames of a video
If your two images are perfectly aligned, then see
https://www.imagemagick.org/Usage/compose/#difference
https://www.imagemagick.org/script/compare.php
https://www.imagemagick.org/Usage/compare/
For example, try
https://www.imagemagick.org/Usage/compose/#difference
https://www.imagemagick.org/script/compare.php
https://www.imagemagick.org/Usage/compare/
For example, try
Code: Select all
convert "Video (7)19.jpg" "Video (7)20.jpg" -compose difference -composite -auto-level -negate -threshold 10% -negate result.png
Re: change detection in two frames of a video
dear "fmw42",
thank you very much for your valuable solution. Is there any way to calculate threshold value dynamically at run time? how can we distinguish real bullet holes from noises in very short processing time which exists between two frames?
best regards
thank you very much for your valuable solution. Is there any way to calculate threshold value dynamically at run time? how can we distinguish real bullet holes from noises in very short processing time which exists between two frames?
best regards
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: change detection in two frames of a video
Your images have such low resolution that the bullet holes are tiny. I would not know how to distinguish those from significant noise. If the bullet holes are large enough, you can use -connected-components to filter out all regions that are too small.
As to the threshold, I am not sure there is a good way to do that automatically. But perhaps you can find some value that reasonable in combination with -connected-components.
See http://magick.imagemagick.org/script/co ... onents.php
As to the threshold, I am not sure there is a good way to do that automatically. But perhaps you can find some value that reasonable in combination with -connected-components.
See http://magick.imagemagick.org/script/co ... onents.php