I built a simple OCR to detect text. I now need to identify and segment the text from the source image. I used the Canny edge detector to get something like this.
http://i.imgur.com/at4YTb2.png
Sorry, I don't have enough reputation to post images.
I can't figure out a way to separate the text part. I have read,
http://www.math.tau.ac.il/~turkel/imagepapers/text_detection.pdf which is using the Stroke Width Transform
ROBUST TEXT DETECTION IN NATURAL IMAGES WITH EDGE-ENHANCED MAXIMALLY STABLE EXTREMAL REGIONS
The algorithms described are probably the best answers but are very difficult to implement in Java. Moreover, in my use cases the text would be prominent much like above. The above algorithms seem like overkill. I would be grateful if anyone can suggest any alternative to solve this problem. Thanks!
Related
I have to detect all text zone of a newspaper basing on edges automatically (new ideas are welcome).
The result that i need is many TXT file containing each one an article.
Take a look to this demonstration.
This question is way too broad.
If you want a proper answer then you need to ask very specific questions and show us what you have tried. We don't even know what formats you have to work with so we cannot offer any real help other than guessing.
Having said that:
You probably want to look into using image recognition software.
A good API to look into is OpenCV: http://opencv.org/
Here is a tutorial on how to use OpenCV with Java: http://docs.opencv.org/3.0-last-rst/doc/tutorials/introduction/desktop_java/java_dev_intro.html
And here are two similar questions that may help you:
Finding location of rectangles in an image with OpenCV
How to recognize rectangles in this image?
I am trying to check if an image is on a program's interface. I know how to grab the program's image but I cannot figure out a way to check if the image on on the program's screen. How can I do this?
I think checking containing one image in another is a question of "computer vision", so maybe some special libraries like OpenCV can helps you.
And this question on stackoverflow could be so useful too
OpenCV Template Matching example in Android
If you want to do the checking within the same program as the one that loads the image, it should be possible by checking the user interface control properties/attributes, and also the return values of the functions/methods used to set the image. In such a situation, Computer Vision is overkill. In this case, may be you can post some of the code used for loading the image, so that others can suggest solutions.
But if you are using a different program to capture the screen and look for the image, SIFT and SURF features of OpenCV should do the job. The accuracy won't be bad in this application.
I am looking for a way to offer a live videostream through a website, but with the idea that certain area's on the videostream are either blurred or pixelated. Because this will be for a competition based setup, it is important that the manipulation is done on the server side and not on the client side. Can anyone recommend me what the best practice is on this, because i have been playing around with ffmpeg but haven't made any progress so far.
What you want to do is called a convolution with a gaussian filter.
Doing this for only a small region would be pretty fast, so you should still be able to achieve good framerates.
Here's a page with a bunch of examples.
Some previous questions on SO:
How do I blur an image?
Fastest Gaussian blur implementation
I am trying to solve the problem of template matching, wherein we have been given a pattern image I have to find whether that image exists as a sub-image inside an image i.e. source/search image.
I have implemented SAD [Sum of Absolute Difference Solution using JAVA give in Wikipedia using some ].
Now, I want to implement a scale-invariant template matching solution for the given problem.
Where I don't care which scale is given for a pattern image, if there is a match at a certain scale then it should report it.
Things I have tried so far:
1. I have seen SIFT but it is too complicated to implement it.
Also, Image Fingerprinting used by TinEye is not that effective as it is useful in finding similar image, not sub-image.
I can not use exhaustive approach which I used earlier as there could be many scales at which there is a match.
CUSTOM APPROACH: Classify the image in several color groups e.g. 255 colors but I am not sure that would help, in scale - in-variance problem.
I saw some questions, but they are rotation and scale invariant, I just need scale-in-variance.
It is one of the semester project, on which I am currently working on.
Can someone guide me about possible solutions and approaches that I can take?
I'm doing a project to implement virtual chemistry laboratory system. I tried to do this by using java2D. I have come across a big issue here. that is how to show some kind of filling effect to a beaker or to a flask (beaker is an image). I tried out this with setPixel() method in WritableRaster(java.awt.image) class. but it is not much useful.
I need a help to show something filling to a beaker and to show color change when mixing two chemicals. please remember that beaker is an image. thanks in advance if anyone can give me a solution with sample code.
Conveniently, many classes implement the Shape interface. Implementing classes work well with fill(), as shown here. To display color transitions, consider AlphaComposite, shown here.
I'd advise using a dynamic SVG canvas using Batik, and then you can use advanced high-level features like masks and blending and such. It's not the most efficient solution, but who cares? It's flexible for the future. Also, it'd take a lot of optimisation to work out what parts of the image have actually changed and pass that through for efficiency. I expect Batik does that as standard. Also, you'll have something that looks really very nice.
Anyway, then you just need to use Inkscape to create the SVG, and then modify the DOM (Document Object Model) accordingly. It's just like messing with HTML. Here is some SVG beaker clipart.