2014-07-18 11:47:19 -0600 | asked a question | Android: unexpected behaviour (rectangles from mGrey appearing on screen) Hi, could you please look at my problem? I am trying to make my own face detecting android app, which is based on mixed-processing and face detection tutorial. It runs super slow on my device cca 2.5 FPS on 240x160 resolution. I was trying to find the problem and make it faster, so one of the things I made was displaying result in greyscale instead of RGB. When I changed it back, I forget to delete line where I was drawing rectangles to Greyscale Mat (mGr). But for my surprise, those were still appearing on the screen (those were white), with approx one frame delay after red ones from the RGB Mat. So there were both. How is this possible? I did not draw into mRGB mat any white rectangles :/ Here I call it in Java: And this is how it looks like in C++ part Another thing is, that from the log, I can see that I am receiving plenty of frames, while I am still processing the first one. Could I somehow block receiving new frames till processing of present one finishes and therefore get some resources for ongoing detecting operation? Thanks! |