lessthanoptimal / BoofCV

Fast computer vision library for SFM, calibration, fiducials, tracking, image processing, and more.
http://boofcv.org
1.05k stars 259 forks source link

Bug in Release 0.43 #391

Closed acriba closed 1 year ago

acriba commented 1 year ago

HoughTransformGradient is not working anymore in release 0.43. The same code executes perfectly in Release 0.42.

Here is the Stack Trace:

Exception in thread "main" java.lang.NullPointerException: Cannot read field "a" because "l" is null
    at georegression.struct.line.LineSegment2D_F32.setTo(LineSegment2D_F32.java:58)
    at boofcv.alg.feature.detect.line.ImageLinePruneMerge.pruneSimilar(ImageLinePruneMerge.java:114)
    at boofcv.alg.feature.detect.line.HoughTransformGradient.mergeLines(HoughTransformGradient.java:168)
    at boofcv.alg.feature.detect.line.HoughTransformGradient.transform(HoughTransformGradient.java:128)
    at boofcv.abst.feature.detect.line.HoughGradient_to_DetectLine.detect(HoughGradient_to_DetectLine.java:91)

The code to initialize the detector is simple:

ConfigHoughGradient config = new ConfigHoughGradient(100);
DetectLine<GrayU8> detectorFoot = FactoryDetectLine.houghLineFoot(config, null, GrayU8.class);

I had to revert to release 0.42.

lessthanoptimal commented 1 year ago

Yeah, that's already been fixed. Working on a 0.43.1 release to fix this and another issue. Sorry about that!

On Wed, May 31, 2023 at 7:51 AM acriba @.***> wrote:

HoughTransformGradient is not working anymore in release 0.43. The same code executes perfectly in Release 0.42.

Here is the Stack Trace:

Exception in thread "main" java.lang.NullPointerException: Cannot read field "a" because "l" is null at georegression.struct.line.LineSegment2D_F32.setTo(LineSegment2D_F32.java:58) at boofcv.alg.feature.detect.line.ImageLinePruneMerge.pruneSimilar(ImageLinePruneMerge.java:114) at boofcv.alg.feature.detect.line.HoughTransformGradient.mergeLines(HoughTransformGradient.java:168) at boofcv.alg.feature.detect.line.HoughTransformGradient.transform(HoughTransformGradient.java:128) at boofcv.abst.feature.detect.line.HoughGradient_to_DetectLine.detect(HoughGradient_to_DetectLine.java:91)

The code to initialize the detector is simple:

ConfigHoughGradient config = new ConfigHoughGradient(100); DetectLine detectorFoot = FactoryDetectLine.houghLineFoot(config, null, GrayU8.class);

I had to revert to release 0.42.

— Reply to this email directly, view it on GitHub https://github.com/lessthanoptimal/BoofCV/issues/391, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFUOV2YQUJDSNZRFQ3F2CDXI5LIFANCNFSM6AAAAAAYVS2RFU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- "Now, now my good man, this is no time for making enemies." — Voltaire (1694-1778), on his deathbed in response to a priest asking that he renounce Satan.

lessthanoptimal commented 1 year ago

Fix is out on Maven Central.

On Wed, May 31, 2023 at 4:17 PM Peter A @.***> wrote:

Yeah, that's already been fixed. Working on a 0.43.1 release to fix this and another issue. Sorry about that!

  • Peter

On Wed, May 31, 2023 at 7:51 AM acriba @.***> wrote:

HoughTransformGradient is not working anymore in release 0.43. The same code executes perfectly in Release 0.42.

Here is the Stack Trace:

Exception in thread "main" java.lang.NullPointerException: Cannot read field "a" because "l" is null at georegression.struct.line.LineSegment2D_F32.setTo(LineSegment2D_F32.java:58) at boofcv.alg.feature.detect.line.ImageLinePruneMerge.pruneSimilar(ImageLinePruneMerge.java:114) at boofcv.alg.feature.detect.line.HoughTransformGradient.mergeLines(HoughTransformGradient.java:168) at boofcv.alg.feature.detect.line.HoughTransformGradient.transform(HoughTransformGradient.java:128) at boofcv.abst.feature.detect.line.HoughGradient_to_DetectLine.detect(HoughGradient_to_DetectLine.java:91)

The code to initialize the detector is simple:

ConfigHoughGradient config = new ConfigHoughGradient(100); DetectLine detectorFoot = FactoryDetectLine.houghLineFoot(config, null, GrayU8.class);

I had to revert to release 0.42.

— Reply to this email directly, view it on GitHub https://github.com/lessthanoptimal/BoofCV/issues/391, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFUOV2YQUJDSNZRFQ3F2CDXI5LIFANCNFSM6AAAAAAYVS2RFU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- "Now, now my good man, this is no time for making enemies." — Voltaire (1694-1778), on his deathbed in response to a priest asking that he renounce Satan.

-- "Now, now my good man, this is no time for making enemies." — Voltaire (1694-1778), on his deathbed in response to a priest asking that he renounce Satan.

acriba commented 1 year ago

Great News and great work! Thank you for your prompt reply. I can confirm that everything works as expected again.