Android Question opencv32

roberto64

Active Member
Licensed User
Longtime User
Hi JordiCP, I am creating this example as tweaking a line of text and then tesseract ocr to visualize it, but I do not understand why OCVJavaCameraView on my smartphone does not display utterly but centrally.
regards
Roberto
 

Attachments

  • mYaPPLIC.zip
    59.4 KB · Views: 294

JordiCP

Expert
Licensed User
Longtime User
Can you post a picture of how it is displayed in your smartphone? And how would you like it to be?

In mine, it scales-up to the max available screen size, while keeping aspect ratio, so it leaves a left-right centered margin.

I see several things that can be improved in your code. The most important are:

-> Processing will not necessarily work better if you get higher resolution images: now you are initializing the camera with a preview resolution close to the panel size. The processing will take much longer if you do so. Try to prototype everything with 640x480 and only when it is ready decide if you need higher resolution.
-> In the preview, you are creating each time all the OCVMats and even the detector. They are expensive operations. If you have to use them each time, they should be declared as globals and reuse the same vars.

I will be able to help you with these 2 points tomorrow if you want.
 
Upvote 0
Top