I am using this package and creating two instances of its class PixelMatching which uses dart ffi and some c++ code to perform feature matching using open cv. I initialise the two instances with different source images with which it compares my camera feed.
However, both of the instances end up using the first image in their comparisons.
Here is where I initialize the matching with two different images. initializing the instances
This is a part of the function where I call the methods to compare the image with my camera stream. The two instances are called alternatively, in one frame the first and in the next the second instance. calling the methods
Am I creating the classes in some wrong way? I don't understand why the two instances can't hold different states.
You need to call
dispose()on the first instance first.Then use another.