I have a web site that allows users to upload images of cars and I would like to put a privacy filter in place to detect registration plates on the vehicle and blur them.
The blurring is not a problem but is there a library or component (open source preferred) that will help with finding a licence within a photo?
- I know nothing is perfect and image recognition of this type will provide false positive and negatives.
- I appreciate that we could ask the user to select the area to blur and we will do this as well, but the question is specifically about finding that data programmatically; so answers such as 'get a person to check every image' is not helpful.
- This software method is called 'Automatic Number Plate Recognition' in the UK but I cannot see any implementations of it as libraries.
- Any language is great although .Net is preferred.
Perceptual quality measures for images
Adding external images to PDF using iText
Print CMYK image
You can check it at http://anprmx.codeplex.com.
RDLC + ReportViewer Control - how to display images from the database?
Comparing two PDF documents that are digitized faxes
Working with images when uploading in Adobe Flex
Operating system independent image adressing
WIA versus WPD Digital Camera Image Acquisition and API
I would like a system where I can point a video camera at some sailing boats, all of which have large, identifiable numbers on them, and have it identify the boats and send a tweet when they sail past a video camera..
It looks pretty accurate and it should do exactly what you need (recognize the plate regions).
Here is the GitHub project: https://github.com/openalpr/openalpr.
There are quite a few papers about this topic, but I never found any concrete open-source implementation.
There are a lot of commercial implementations though, but none of them with a price quote, so they're probably pretty expensive..
Free license plate recognition....
Here's how to go about doing this.
The included code hints use OpenCV with Python.
- Convert to Grayscale.
- Apply Gaussian Blur..
img = cv2.imread('input.jpg',1) img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) img_gray = cv2.GaussianBlur(img_gray, (5,5), 0)
- Apply Sobel Filter to detect vertical edges.
- Threshold the resultant image using strict threshold or OTSU's binarization.
cv2.Sobel(image, -1, 1, 0) cv2.threshold()
- Apply a Morphological Closing operation using suitable structuring element.
(I used 16x4 as structuring element).
se = cv2.getStructuringElement(cv2.MORPH_RECT,(16,4)) cv2.morphologyEx(image, cv2.MORPH_CLOSE, se)
- Find external contours of this image.
cv2.findContours(image, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)
- For each contour, find the
- Select rectangles based on aspect ratio, minimum and maximum area, and angle with the horizontal.
(I used 2.2 <= Aspect Ratio <= 8, 500 <= Area <=15000, and angle <= 45 degrees)
minAreaRect()s are shown in orange and the one which satisfies our criteria is in green.
- There may be false positives after this step, to filter it, use edge density.
Edge Density is defined as the number of white pixels/total number of pixels in a rectangle.
Set a threshold for edge density.
(I used 0.5)
- Blur the detected regions.
The detection can also be trained using HOG+SVM to increase precision..
I use it in a couple of my applications..
This is commercial, but they provide trial key..
I reading an image and storing it.
Micrsoft office is able to read tiff files and return alphanumerics.