I am working on an android application in which I have to perform OCR from an Image. For example if I have drawing of building, user clicks on a particular area on the image (like Kitchen or Parking lot), after that click I want the location name/number where the user have clicked. This number will be present in that location.
in the given image if i click on Lecture Room part then the application must detect the area where I have clicked and give me the name (i.e. Lecture Room) for further queries..
Please help me out. I have tested many applications but most of them detects words not the drawing images.
Edit
It is just like HTML Image Maping
Interesting project, I've been developing an Android app with OCR and I included useful information and a code example in the next post, have a look at it and if you have any question, just ping me:
https://solidgeargroup.com/ocr-on-android
I'd say that you need to work on how you have abstracted your problem, if the goal of the application is to read any image file and extract all the text from it in order to make it searchable, you've got quite a project ahead of you.
However, if your goal is to make a finite number of maps clickable, I'd say that you should create a table of all the known locations in each image and then save the coordinate where the user clicked. That way you can look up that coordinate in your table of known locations and present the corresponding room to the user. A room could for instance be defined by the coordinates of its northwest corner and its southeast corner. Determining whether or not a coordinate is within those boundaries is trivial.
If your application really requires OCR you are in a world of trouble I'm afraid.
Edit: minor mistakes edited out.
Related
So I am trying to implement a personal project in Android where you can scan different receipts from shopping centers. I want to come up with a module which helps the manual input of users a little bit, by automating as much of the activity. Situation is:
I would like to fetch the total of the receipt, knowing that as a standard, it can be found on a line like this: TOTAL........... 33.9 Currency. How can I actually get the blocks which are on same axis with the block containing "Total"?
Same thing applies for each individual product, I would like to take the values of each individual cart product and it's value and put it in an Edit Text in Android, so the user can do the final re-touching.
Example receipt:
Shopping receipt from Mega Image
This looks like a project idea instead of coding questions.
One thing I suggest is to guess the blocks from the relative location of bounding boxes.
It is a challenging research problem though. Perhaps Vision API will open some feature for customers to directly understand receipts.
To get text line by line you need to setup a custom logic that would process lines based on the symbols returned by Google Vision API, which could go along the lines of the following steps:
Create a collection of all the symbols returned in a TextAnnotation
Iterate through the collection and create a line string based on checking the first symbol's X coordinate which is givenSymbol.BoundingBox.Vertices[2].X against all the other symbols X coordinates.
Implement checks to skip already processed words and think about implementing an X offset, that would check if a given X coordinate is close enough to the one you're checking against, to account for a slightly tilted input text.
In what language(s) is it (if at all possible) to check the content of an image?
Ideally, I am looking for web / mobile languages, but whatever is possible.
As a comparative example, I wish to make the first image of a castle 'valid' and the second image of the wall 'invalid', due to there been no substantial content in the second image. Meaning, the second image, which is the wall, has too much similarity across the image and therefore doesn't contain valid content.
Please do not provide a 'how to do it', as I am a student and will be working out solutions for myself as much as possible, I just need to know that what I want to achieve is possible in the first place and a starting point for language(s).
**EDIT2: What Javier has suggested about computer vision is on the right track to what I mean. Image analysis to break it down a little more. I wish to visually analyse an image and determine how the range of varied the colours across an image are to determine if there is actually a proper image present on not just a picture of a wall
I am working on an app in which I have pdf images that contain have text, I need to highlight the text on which user long pressed by his finger, as in pdf reader like repligo and others.I searched a lot but didn't find any relevant way to do it.
Can someone will share the idea to do it or it maybe more helpful if someone can explain via some code or example.
My Friend.
Even I am also thinking about the same kind of situation. According to me, It can only be done if u know the pixel values of the text . I mean from where it start and at which pixel it ends. Then you have to make a Database for the entire pdf like the Quran Android Application on Market. They simply recognize the device before sending the data from server to client. '
Suppose u r using tablet, then tablet specific pixels are there n if you are using Mobile Device, Then device specific coordinates will come in form of database which can easily be matched by touch.
Then u can easily find which word or paragraph is going to be selected . Then u can do the selection part by using the object of Path in Canvas.
Thank You
Hi to all the members of this great community!
This is my first question so forgive me for possible mistakes. I hope that from this day on i can be helpful for some of you as hopefully you will be for me.Getting to the question:
I am building an android app whose purpose is to search for nearest fuel-points and nearest care-repair-centers. I am very new to android and thx to the numerous posts about android in here I have managed to reach the point where i have build the map and animate it to my current location while updating my location.
Now i have to add the markers of the points of interest. Since they are at least 10 (I will add them only for demonstration purposes) i think it's not wise to add them through 10+ repetitive calls to itemizedOverlay.addOverlayItem(). My idea was to save them in a file in the format ( " latitude " , "longitude" , simple_description_title , other info ) and than in some way import the first 2 fields for the geopoint and the 3rd for the title.
I will use than the 4th later for some type of tooltip text (for example tel_number).
Do you think this is a good approach? And how can I implement the file reading(if) in the code that extends ItemizeOverlay().
I didn't post the code until this point since it's irrelevant.
Welcome to SO, let's jump right into your problem/question.
1.) Since you are only adding 10 points of interest it won't matter if you just call itemizedOverlay.addOverlayItem() for all 10 because the trick is to call itemizedOverlay.populate() only after you have added all the overlayItems using itemizedOverlay.addOverlayItem(), this way you don't compromise on performance.
2.) Now, once again, since you are only doing a demonstration I would advise you to simply hard-code all the 10 overlays with their respective geolocations into the Android code itself. This way you WON'T have to worry about reading data. Also, using a txt file to store data isn't the best option both performance and convenience wise. This is what databases exist for.
3.) If, and when you do this in the future, you do need to use some dynamic data to populate your markers with, then I'd STRONGLY advise you to use either
SQLite: The embedded database that Android offers, it's great for storing small bits of information that's required for your application such as description title, other info, the latitude, longitude, however, if you have some sort of a connection based application where you need to update globally accessible data every once in a while I'd advise you to use the next option,
MySQL: This is an online database that you have to interface with using a server and PHP. The advantage of using an online database is that you can now share information between different users (friends, contacts, followers etc.) by reading and writing to and from the database.
I would like to write an application that would run initially on a Motorola Droid. The application would retrieve row(s) from a database and display some textual data from the rows as well as an image associated with the record that will be stored on the SD card.
I really think that the results would be best displayed in a fashion similar to the Calendar app that ships with the Droid - that is the data and associated image will scrollable left and right by dragging the current "page".
I assume that some of you will know how this is implemented - I dont' seem to be able to ask the right question when searching. Any help would be appreciated.
Is this the Calendar app you are referring to? Looking through the source might help.