SimpleBlobDetector doesn't check when moment m00 is equal to zero (Bug #4321)


Added by Laurent Berger almost 10 years ago. Updated almost 10 years ago.


Status:Done Start date:2015-05-07
Priority:Normal Due date:
Assignee:Maria Dimashova % Done:

0%

Category:features2d
Target version:3.0 Estimated time:1.00 hour
Affected version:branch 'master' (3.0-dev) Operating System:Any
Difficulty:Easy HW Platform:x64
Pull request:

Description

In SimpleBlobDetector there is an exception when there moment m00 is equal to 0.

When SimpleBlobDetector is used at line 270 it is written

center.location = Point2d(moms.m10 / moms.m00, moms.m01 / moms.m00);

There is no check about m00 here.
There is check at line 290 but it's too late. This check shoulb at lne 269


History

Updated by Vadim Pisarevsky almost 10 years ago

thanks for the patch! it has been integrated

  • Status changed from New to Done
  • Target version set to 3.0

Also available in: Atom PDF