Green laser dot detection

Hi,

I am very new to coding. Basically, I want to detect the laser dot based on its colour and shape at the same time. But the fact is that it was not properly detected. The screenshot below shows what I had right now.

Additionally, I also would like to know whether we are able to train custom data from scratch for laser dot detection, besides the face recognition script under “Machine Learning”?

Thanks a lot!

That code makes no sense. See the find_blobs() example for single color tracking (Examples → Color Tracking). Do not use find_circles(). You don’t need anything other than the blob detector.

Thanks for your reply! The result was disturbed by the laser light reflection when I only used find_blobs(). Please have a look at the image below.
image

Is there a way to improve the accuracy?

Thanks!

Use area and pixel thresholds to filter the smaller blobs. Then tighten the color thresholds.

Thanks a lot for the guidance!

I also would like to know whether we are able to train custom data from scratch for laser dot detection, besides the face recognition script under “Machine Learning”?

Thanks!

You don’t need ML for a laser spot. It would be very pointless. Classical computer vision approaches are superior to ML for this problem.

ML is good for problems where you can’t describe to a machine how it would detect something. In the cases where that is possible ML would not perform better but worse.

E.g. trying to write an algorithm to detect a cat would be impossible with mount ML, but, trying to detect a bright spot does not need it.

Please realize that ML is just statistical regression. If you’d have an algorithm that detects an object which can be written in closed form… then this is 10000% better than an ML model at doing the job. E.g. a blob detector for finding the laser beam will do a better job since it requires no training data of all possible situations to produce the correct result.

Thanks a lot for the answer!