FAST detection OpenCV for Android gives blue/red screen
I want to detect all the FAST corner with my application, and use the following code:
public Mat onCameraFrame(Mat inputFrame) { MatOfKeyPoint points = new MatOfKeyPoint();
FeatureDetector fast = FeatureDetector.create(FeatureDetector.FAST); fast.detect(inputFrame, points); Scalar redcolor = new Scalar(255,0,0); Imgproc.cvtColor(inputFrame, mRgba, Imgproc.COLOR_RGBA2BGRA,4); Features2d.drawKeypoints(mRgba, points, mRgba, redcolor, 3); return mRgba; }
It doesn't return errors, but it also doesn't show the FAST points. Instead I get a blue/red screen. I have no idea what is wrong in the code that this happend.
UPDATE: I got the points visible on the screen, but the colors are still messed up. A new problem is that i get like 200+ FAST points, can i put a limit on this? At higher resolution images (the one below is 320*240) there are so much points that is causes lag in my FPS. How do I limit this?
How did you manage to show FAST points,i am not able to do so. i tried same code posted here.pls help