I want to read the meter readings from the given image(http://craigheadelectric.coop/content/automated-meter-reading)

asked 2014-08-14 07:41:50 -0600

Anilkumar gravatar image

updated 2014-08-20 05:18:15 -0600

I want to read the meter readings from the given image(http://craigheadelectric.coop/content/automated-meter-reading) by using tesseract so that i need to find the rectangular shape from the image then I want to crop the image up to meter readings how can I accomplish this task?

edit retag flag offensive close merge delete

Comments

1

you could try to adapt the cpp squares sample

berak gravatar imageberak ( 2014-08-20 04:47:27 -0600 )edit

AFAIK it is just the C++ interface wrapped in a JNI instruction. So you need two things:

  • The JNI instruction guide for OpenCV using a sample -click here-
  • The C++ code for finding a rectangle, which could be versatile due to the situation. Can you give more information there so that we can suggest a correct approach? Maybe give a sample image?
StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-20 04:48:18 -0600 )edit

So combine both answers and there you got your solution ^_^

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-20 04:49:35 -0600 )edit

StevenPuttemans in my app I just want to take a picture from camera after that i want to apply image processing for cropping the rectangular shape, can you provide any samples ?

Anilkumar gravatar imageAnilkumar ( 2014-08-20 04:52:40 -0600 )edit

@Anilkumar please read the link provided by berak and start testing ... this is not an off the shelf code delivery service ...

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-20 04:57:40 -0600 )edit

crop to what rectangle , please ? could you be a bit more precise, about what you're trying to achieve ?

berak gravatar imageberak ( 2014-08-20 04:59:34 -0600 )edit
1

@berak In my captures image I can have a rectangular shape FYI(http://craigheadelectric.coop/content/automated-meter-reading) now I want to find the rectangular shape so that I can crop the Image upto the meter readings

Anilkumar gravatar imageAnilkumar ( 2014-08-20 05:07:04 -0600 )edit

@StevenPuttemans,@berak I want to read the meter readings from the given image(http://craigheadelectric.coop/content/automated-meter-reading) by using tesseract so that i need to find the rectangular shape from the image then I want to crop the image up to meter readings.

Anilkumar gravatar imageAnilkumar ( 2014-08-20 05:11:37 -0600 )edit
1

^^ hey, you should have started your question with that info in the 1st place. please have a look at the faq as well

berak gravatar imageberak ( 2014-08-20 05:12:11 -0600 )edit

once you found the Rect, cropping is just: Mat cropped = Mat(image,Rect) (or submat in java)

berak gravatar imageberak ( 2014-08-20 05:23:30 -0600 )edit