Find the unique area from the overlapping rectangles in python [closed] - python

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am trying to find the unique area from multiple bounded box generated to find the screen capture by the products in python

You can try threshold the image by colors first (using either HSV threshold, or RGB).
Then having several binary images, you can use Contour Approximation (number 4 on the page) feature, using Douglas-Peucker algorithm. Fill the resulting bounding boxes.
Afterwards, you can subtract resulting binary images from one another to find exact areas of intersections.
Hope it helps!

Related

Detecting a watermark using opencv [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I want to detect a watermark in an image using OpenCV.
Particularly, I want a rectangular box around the watermark, if present.
Can you please help me out with the python code?
Though the solution would be dependent on the actual image content (that needs to be preserved) and the watermark. But in these kinds of problems, following sequence of steps is usually followed:
Converting the image to grayscale (cv2.cvtColor(img, cv2.COLOR_BGR2GRAY))
Applying morphological filtering Erosion, Dilation
Taking the difference of this output from the actual image

Character recognition from image with low contrast [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have images (about 1000) with different numbers. Using opencv I extracted ROI from these images. Here's a small sample:
And I don't know how to extract these numbers or identify them. For opencv have a small threshold. I tried VGGnet keras (I rotated each image 1 degree to create 360 images as input for tensorflow), but the control image was mostly not recognized. Does anyone have an idea?

How to get dominant color from an image? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have an image with a car(only the car with a little background) in it. I need to find the color of the car. I tried getting the most frequent R, G, B values and combining them, but this may not guarantee the most frequent (R, G, B) pixel (can it?). I also tried making kmeans-clusters of (R, G, B) pixels and get the centroid of the biggest cluster. But I don't know what k to use. Which method do I use?

Bounding boxes around text regions with different font size [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am trying to implement some kind of text detection algorithm and I want to separate the image into regions where each region contains different font size.
As in this image, for example:
Is there any easy way to implement it using python and/or opencv? if so, how?
I did tried googling it but could not find anything useful..
Thanks.
This is an interesting question. There are a few steps that you need to take in order to achieve your goals. I hope you are sufficiently informed of basic computer vision algorithm (knowledge in openCV function helps) to understand the steps i am suggesting.
Group all the words together using morphological dilation process.
Use openCV findcountour function to label all the blobs. This will give you the width and height information of each blob as well.
Here is the tricky part, now that you have data on each blob, try to run a clustering algorithm on the data with the location(x,y) and geometry(width,height) as your features.
Once you cluster them correctly, its a matter of finding the leftmost, rightmost, topmost and bottom data to draw the bounding rect.
I hope this will provide you enough information to start you work. Its is not detailed but i think its enough to guide you.

How to extract individual images of words from a picture? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am trying to extract images of words from a picture that mostly has sentences in different type fonts. For example, consider this scenario:
Now I would want to extract individual images of words Clinton, Street and so on like this:
I tried applying the binary dilation but the distance between the white and black area was almost negligible to crop out the words. However, there was a little success when I first cropped out the blank area in the original image and then re-do the binary dilation on the cropped image with a lower F1 value.
What should be the best and high-accuracy approach to separate out images of the words from this picture?
Ps: I am following this blog post to help me get the task done.
Thank you
Fennec
With dilatation, I get this :
Is this not satisfactory for you because of the fact that lines may be too close by and merged together with dilatation (like it sort of happens for the last two lines) ?
Other stuff to try, from the top of my head :
-clustering.
-low level method where you count number of pixels in each line to find out where the lines are, then count the pixels in each column to figure out where the words are in each line.

Categories

Resources