You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wasted some time yesterday trying to figure out why my code does not draw the right shapes and finally noticed that I was creating white color using new Scalar(255) instead of new Scalar(255.0).
I'd suggest making the public Scalar(long size) constructor private and replacing it with a static factory method to avoid this madness I had to go through.
The text was updated successfully, but these errors were encountered:
These constructors are now all gone with version 1.5.1. There doesn't appear to be any classes in all the presets that are both meant to be used as part of arrays and have constructors with a single real value. Thanks for the suggestion!
There are two, very easily to confuse, constructors in
org.bytedeco.opencv.opencv_core.Scalar
:and
I wasted some time yesterday trying to figure out why my code does not draw the right shapes and finally noticed that I was creating white color using
new Scalar(255)
instead ofnew Scalar(255.0)
.I'd suggest making the
public Scalar(long size)
constructorprivate
and replacing it with a static factory method to avoid this madness I had to go through.The text was updated successfully, but these errors were encountered: