NXT-Spy – Better frame-rate for the camera app.

Today, I came back to the camera app because I really wanted to have a better frame rate than the current 1/sec.
So first of all I tried to find which process is guilty for this low rate, the most obvious one was the heavy decodeYUV function that is ran before sending the current frame from the phone.
So to fix this problem, I decided to send the raw YUV image to the computer which will then decode it as a RGB image.

The main problem I faced while doing this was to convert the RGB int array to a RGB BufferedImage [source].
I now have a way more acceptable frame-rate of something like 3/sec. I will also soon probably code a timer to know exactly the frame-rate I am currently at in order to enhance it still more.

Here is a video showing the current frame rate I have obtained:
[yframe url=’http://www.youtube.com/watch?v=148Qd3x6IeQ’]

Leave a Reply

Your email address will not be published. Required fields are marked *