Detecting a watermark using opencv [closed] - python

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

Related

screen scrape alphanumeric chars from 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 2 years ago.
Improve this question
I'm trying to find a way to screen scrape the letters and numbers (mainly numbers) from the attached picture.
example picture
In previous attempts, I've used pyocr and many other variations.
My question is, has any body found a way to scrape off numbers? Or how to train the pyocr algorithm to use custom data?
Thanks in advance!
The folks at PyImageSearch have a TON of info about processing images in Python with OpenCV.
They even have a free blog post about using Tesseract OCR. Though Tesseract can be a bit fussy about fonts, the good news is it looks like your text in the image should always be the same font, and perfectly aligned horizontally and vertically.
(disclaimer: I'm a student of theirs; but I don't work for them)
https://www.pyimagesearch.com/2018/09/17/opencv-ocr-and-text-recognition-with-tesseract/

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 use OCR to read characters engraved on a metallic plate if both the background and the foreground are of the same color [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
Character engraved on a metal plate
How to extract the characters engraved on a metallic plate?
OCR( Pytesseract) is unable to give good results. I tried Ridge detection but in vain. Any form of threshold doesn't seem to work because the background and the foreground are of the same color. Is there a series of steps that I can follow for such a use-case?
I think Binarization wont work in your image. If any preprocessing improves the quality of this image that doesn't mean that same method will work on all the images you have.
So my suggestion is to create your own Custom OCR using machine learning or CNN.
You can convert your digits into a 28x28 image matrix and then reshape it into 1x784 matrix and perform the training like MNIST dataset is trained.

Find the unique area from the overlapping rectangles in python [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 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!

How to create very high resolution bitmaps in python? [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 6 years ago.
Improve this question
Currently as per what I know the max resolution that can be created using pillow's image function is 3000*3000 but I need to create image which has resolution of 10000*10000 or more programmatically ???
If you people didn't get what I meant ,just comment to me rahter than closing this question (please)I will give a more detailed question!!!
The only ways to create a pixel-perfect SVG from a bitmap is to <rect/> elements for each pixel (or block of same-colored pixels), or to use an <image> element to reference your bitmap. In neither case will you end up reducing the file size.
A vector format like SVG is not well-suited to representing hand-tweaked pixels. You likely want to use a bitmap format that supports lossless compression, such as PNG. If file size is of critical importance, you may wish to use a tool like OptiPNG to ensure that your PNG files are as small as possible.

Categories

Resources