Click here to Skip to main content
15,792,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to detect number plate from an image and blur that rectangle part. i have already detected number plate and for blurring, i have a problem with the selected rectangle.
whole image is getting blurred, but i want only selected part.

What I have tried:

i have tried Gaussian blur function.
Updated 4-May-18 0:04am
dan!sh 4-May-18 3:40am    
You should update the question with the code that you have tried so far.
Maciej Los 4-May-18 4:26am    
If you're able to detect rectangle of image with number plate, you're able to blur that region of image.

1 solution

Take a look at these examples:
Creating a Gaussian Blur with VB.NET[^]
Gausian and Alpha Blurring[^]

Both uses 2 loops, which changes pixels from 0 to Width/Height of Image:
' Loop the rows of the image
For PixelY = 0 To bmp.Width - 1
    ' Loop the cols of the image
    For PixelX = 0 To bmp.Height - 1

All what you need to do is to blur pixels occupied by number plate ;)

|----------------------------| <--- image
|                            |
|                            |
|    |--------|              |
|    |--------| <------------------ number plate
|                            |
|                            |
Share this answer
Member 13458399 4-May-18 6:05am    
Thanks for the answer.
ptfRectPoints = licPlate.rrLocationOfPlateInScene.GetVertices() 'get 4 vertices of rotated rect

Dim pt0 As New Point(CInt(ptfRectPoints(0).X), CInt(ptfRectPoints(0).Y)) 'declare 4 points, integer type
Dim pt1 As New Point(CInt(ptfRectPoints(1).X), CInt(ptfRectPoints(1).Y))
Dim pt2 As New Point(CInt(ptfRectPoints(2).X), CInt(ptfRectPoints(2).Y))
Dim pt3 As New Point(CInt(ptfRectPoints(3).X), CInt(ptfRectPoints(3).Y))

i have rectangle's points can i use them to blur a inner portion of that rectangle?
Maciej Los 4-May-18 8:08am    
Wendelius 4-May-18 13:05pm    
Nicely explained, a 5.
Maciej Los 4-May-18 14:35pm    
Thank you, Mika.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900