开发者

Filtering the camera preview

开发者 https://www.devze.com 2023-01-11 23:44 出处:网络
I am trying to display a filtered versi开发者_C百科on of the camera preview. The code runs without errors but the device is showing the preview instead of the generated bitmap.

I am trying to display a filtered versi开发者_C百科on of the camera preview. The code runs without errors but the device is showing the preview instead of the generated bitmap.

This is the code for my (very small) Activity: http://code.google.com/p/ruellia/source/browse/ruellia/src/br/com/ximp/ruellia/RuelliaActivity.java

I suspect the view layering and the surface holder type, but so far no luck... anyone?


I'm trying to do the same thing. There seem to be a lot of issues with Android around this stuff. See my answer here for some details.

In addition to the challenges with getting the NV21 decoded, I have also found that only some of the Bitmap.createBitmap() methods actually return valid bitmaps that can be drawn to the surface. In the debugger, you can tell that sometimes you get a bitmap back that has mHeight == -1, which I think will not work.

I have also found that ImageView#setBitmapImage() does nothing while View#drawBitmap() works.


There is small android demo in our java ocr project, which does exactly this:

http://sourceforge.net/projects/javaocr/

Compiled version: https://market.android.com/details?id=de.pribluda.android.ocrcall&feature=search_result

0

精彩评论

暂无评论...
验证码 换一张
取 消