SlideShare a Scribd company logo
LEGO
PACKAGE
RECOGNITION
COMP6206
Advanced
Computer
Vision Yaopengfei Lyu 27921832
Li Sun 27536432
Zhenyu Chen 27520129
Lei Zhang 27678385
Flow Chart
Lego Logo
Detection &
Anti-
distortion
Information
Cropped
De-noise and
Thresholding
Optical
Character
Recognition(OC
R)
CNN Training
Dataset
CNN Predict
Combine
Result
Box Number
Identified
2
Image Preprocessing
Scaling change Rotation Perspective transformStandard form
• We use image preprocessing to detect the red logo, recover the
shooting box to standard form from any shooting angle and extract
the area of the number.
• Number area is the area under the logo in the image.
• Standard form was defined as the box surface parallel with the
shooting camera and the texts are normal morphology in the
3
Image Preprocessing
Step1: Using HSV color space
to find the red area in the
image. The result is a mask.
4
Image Preprocessing
Step 2: Finding all contours
from the mask.
5
Image Preprocessing
Step 3: Picking the biggest
quadrilateral from the
contours by some geometric
attribution.
6
Image Preprocessing
Step 4: Detecting and sorting
the four corners by Harris
method. It could also verify
the contour whether is a
quadrilateral.
7
Image Preprocessing
Step 5: Creating a standard
square preparing for affine
transform.
8
Image Preprocessing
Step 6: Calculating the
transformation matrix(tM) by
quadrilateral corners and
standard square corners.
tM could be used to recover
the tortile box.
9
Image Preprocessing
• Pick red area
• Find contours
• Pick quadrilateral contour
• Find and sort 4 corners
• Create standard square
• Calculate tM & Recover image Is that finish?
10
Image Preprocessing
• Pick red area
• Find contours
• Pick quadrilateral contour
• Find and sort 4 corners
• Create standard square
• Calculate tM & Recover image
11
Image Preprocessing
0
1
2
3 • Pick red area
• Find contours
• Pick quadrilateral contour
• Find and sort 4 corners
• Create standard square
• Calculate tM & Recover image
12
Image Preprocessing
0
3
1
2
• Pick red area
• Find contours
• Pick quadrilateral contour
• Find and sort 4 corners
• Create standard square
• Calculate tM & Recover image
13
Image Preprocessing
0
3
1
2
• Pick red area
• Find contours
• Pick quadrilateral contour
• Find and sort 4 corners
• Create standard square
• Calculate tM & Recover image
14
Image Preprocessing
• Matching the feature points with the standard logo image
• Estimating rotation angle by matched feature points
• Rotation again
15
Image Preprocessing
• Matching the feature points with the standard logo image
• Estimating rotation angle by matched feature points
• Rotation again
16
Image Preprocessing
Scaling
Rotation
Perspective
transform
Figx. Implementing result
17
Image Preprocessing-denoise
Problems:
Sharpness;
Light;
Background;
18
Approaches:
Sharpness:
-De-convolution;
Normal:
-Thresholding;
Background:
-Heat Equation;
-Canny Edge Detector;
-Edge Connection;
-Area Filled Function;
Light:
-Black and White Mask;
Sharpness reflects how many details and how much acutance an
image has. ( Clarkvision.com, 2016 )
Image Preprocessing-denoise
Clarkvision.com. (2016). Clarkvision: Image Restoration 2 Using Adaptive Richardson-Lucy Deconvolution. [online] Available at:
http://www.clarkvision.com/articles/image-restoration2/ [Accessed 26 May 2016].
19
Sharpness
Image Preprocessing-denoise
a. Good b. Poor
c. Bad
20
Background
Light
Image Preprocessing-denoise
21
De-convolution
Image Preprocessing-denoise
a. origin b. Sharper c. Over
Sharpness
22
Thresholding
Image Preprocessing-denoise
Otsu Thresholding
b. Bada. Good c. Optimal
23
Heat Equation
Image Preprocessing-denoise
a. original b. Edge c. T=1/35, iteration=13 d. Edge
24
Canny Edge Detector
Image Preprocessing-denoise
a. Original b. Thresholding c. Heat-
Equation
25
Edge Connection
Image Preprocessing-denoise
26
Area Filled Function
Image Preprocessing-denoise
27
Black and White Mask
Image Preprocessing-denoise
28
Optical Number Recognition
1. Generate the training set
2. Three features – Original image, Canny image, Gradient
image
3. Train the classifier – KNN, SVM, Random Forest
4. Pick the result
5. Pick the 5 numbers out
29
Training data
1. There are around 1000 samples for each
number
2. Each number was reshaped to 16*16
3. Doing Canny and HOG(for the gradient) for
each reshaped image
4. Turn the outputs to a 1*256 array.
5. Then we got the Training set, around 3000
samples for each number
30
Training set example
31
Classifier
1. KNN
2. SVM
3. Random Forest
32
Some Results
33
Some Results
34
CNN Training dataset
5 boxes,
each has 6 sides
300-400 pictures per
boxes, totally 1600,
under different
conditions
Testing dataset also
created as 100-200
pictures per box, totally
600.
35
Convolutional Neuron Network
30*30 28*28*32 14*14*32 12*12*32 6*6*32 512 256 128 64
Input Convolution1
by 3*3
Maxpool
subsampling
by 2*2
Convolution2
by 3*3
Maxpool
subsampling
by 2*2
5
Fully
Connecting
Neurons
36
CNN Model Training
Validation accuracy reach 0.83
after 16 epochs.
The best training model we used
have:
Training Loss: 0.08
Training accuracy: 0.96
(1600 training samples)
Testing Loss: 0.17
Testing accuracy: 0.95
(600 testing samples)
37
Convolution Layer results
Convolution 1
with 32 3*3 filters
RELU activation Layer
with 0.5 dropout
Max pool
with 2*2 filter size
38
External Library Used
• Opencv 3.0
for image preprocessing
• Keras 1.0.3 (based on theano)
for CNN model implementation
• h5py 2.6.0
for CNN model written and read
• Levenshtein 0.12.0
for computing string edit distances and similarities.
39
Conclusion
Although the algorithm we developed now can be light-invariant and
pose-invariant, there are still many improvement can be done:
• Accuracy on detection and recognition.
• Fit into mobile platform
By working through this project, we really learned a lot.
• Image processing, like thresholding, HSV color space, heat function
• KNN, SVM, Random Forest in Optical Character Recognition
• Convolutional Neuron Network
• Team cooperating on Github
40
Live Demonstration
Thank you
Please feel free to ask any questions
You are welcome to fork our project at
https://github.com/sotondriver/Lego_classification
41

More Related Content

What's hot

Image formation
Image formationImage formation
Image formation
potaters
 
03raster 1
03raster 103raster 1
03raster 1
Ketan Jani
 
morphological tecnquies in image processing
morphological tecnquies in image processingmorphological tecnquies in image processing
morphological tecnquies in image processing
soma saikiran
 
Fuzzy image processing- fuzzy C-mean clustering
Fuzzy image processing- fuzzy C-mean clusteringFuzzy image processing- fuzzy C-mean clustering
Fuzzy image processing- fuzzy C-mean clustering
Farah M. Altufaili
 
COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image Processing
Hemantha Kulathilake
 
Solving volumes using cross sectional areas
Solving volumes using cross sectional areasSolving volumes using cross sectional areas
Solving volumes using cross sectional areas
gregcross22
 
Image processing spatialfiltering
Image processing spatialfilteringImage processing spatialfiltering
Image processing spatialfiltering
John Williams
 
Fingerprint High Level Classification
Fingerprint High Level ClassificationFingerprint High Level Classification
Fingerprint High Level Classification
Reza Rahimi
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
lalithambiga kamaraj
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
Anubhav Kumar
 
Lect14 lines+circles
Lect14 lines+circlesLect14 lines+circles
Lect14 lines+circles
Siddharth Maloo
 
SIGGRAPHASIA2012_Talk
SIGGRAPHASIA2012_TalkSIGGRAPHASIA2012_Talk
SIGGRAPHASIA2012_Talk
Chih-Tsung Shen
 
Representation image
Representation imageRepresentation image
Representation image
Zena Abo-Altaheen
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
Ahmed Daoud
 
Unit 2 notes
Unit 2 notesUnit 2 notes
Unit 2 notes
Balamurugan M
 
Computer graphics 2
Computer graphics 2Computer graphics 2
Computer graphics 2
Prabin Gautam
 
testpang
testpangtestpang
testpang
pangpang2
 
Morphological operations
Morphological operationsMorphological operations
morphological image processing
morphological image processingmorphological image processing
morphological image processing
John Williams
 
Accuracy Analysis of Three-Dimensional Model Reconstructed by Spherical Video...
Accuracy Analysis of Three-Dimensional Model Reconstructed by Spherical Video...Accuracy Analysis of Three-Dimensional Model Reconstructed by Spherical Video...
Accuracy Analysis of Three-Dimensional Model Reconstructed by Spherical Video...
National Cheng Kung University
 

What's hot (20)

Image formation
Image formationImage formation
Image formation
 
03raster 1
03raster 103raster 1
03raster 1
 
morphological tecnquies in image processing
morphological tecnquies in image processingmorphological tecnquies in image processing
morphological tecnquies in image processing
 
Fuzzy image processing- fuzzy C-mean clustering
Fuzzy image processing- fuzzy C-mean clusteringFuzzy image processing- fuzzy C-mean clustering
Fuzzy image processing- fuzzy C-mean clustering
 
COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image Processing
 
Solving volumes using cross sectional areas
Solving volumes using cross sectional areasSolving volumes using cross sectional areas
Solving volumes using cross sectional areas
 
Image processing spatialfiltering
Image processing spatialfilteringImage processing spatialfiltering
Image processing spatialfiltering
 
Fingerprint High Level Classification
Fingerprint High Level ClassificationFingerprint High Level Classification
Fingerprint High Level Classification
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
 
Lect14 lines+circles
Lect14 lines+circlesLect14 lines+circles
Lect14 lines+circles
 
SIGGRAPHASIA2012_Talk
SIGGRAPHASIA2012_TalkSIGGRAPHASIA2012_Talk
SIGGRAPHASIA2012_Talk
 
Representation image
Representation imageRepresentation image
Representation image
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Unit 2 notes
Unit 2 notesUnit 2 notes
Unit 2 notes
 
Computer graphics 2
Computer graphics 2Computer graphics 2
Computer graphics 2
 
testpang
testpangtestpang
testpang
 
Morphological operations
Morphological operationsMorphological operations
Morphological operations
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
 
Accuracy Analysis of Three-Dimensional Model Reconstructed by Spherical Video...
Accuracy Analysis of Three-Dimensional Model Reconstructed by Spherical Video...Accuracy Analysis of Three-Dimensional Model Reconstructed by Spherical Video...
Accuracy Analysis of Three-Dimensional Model Reconstructed by Spherical Video...
 

Viewers also liked

Disater
DisaterDisater
PW_thesis_defense
PW_thesis_defensePW_thesis_defense
PW_thesis_defense
Philip Wang
 
soft robotics with kings and craft council
soft robotics with kings and craft councilsoft robotics with kings and craft council
soft robotics with kings and craft council
Les Bicknell
 
soft robots
soft robotssoft robots
soft robots
vadla preethi
 
Innovative trends in robotics
Innovative trends in roboticsInnovative trends in robotics
Innovative trends in robotics
Design World
 
Soft robotics
Soft roboticsSoft robotics
Soft robotics
Aishwarya Sharma
 
Design and Implementation of Soft-i-Robot for face Detection and Obstacle Avo...
Design and Implementation of Soft-i-Robot for face Detection and Obstacle Avo...Design and Implementation of Soft-i-Robot for face Detection and Obstacle Avo...
Design and Implementation of Soft-i-Robot for face Detection and Obstacle Avo...
Associate Professor in VSB Coimbatore
 
[131] 소프트로봇 박용래
[131] 소프트로봇 박용래[131] 소프트로봇 박용래
[131] 소프트로봇 박용래
NAVER D2
 
The evolution of robots
The evolution of robotsThe evolution of robots
The evolution of robots
15michaeldunn
 
Lecture
LectureLecture
Mind-Controlled Prosthetics, by Matthew Garibaldi
Mind-Controlled Prosthetics, by Matthew GaribaldiMind-Controlled Prosthetics, by Matthew Garibaldi
Mind-Controlled Prosthetics, by Matthew Garibaldi
Matthew Garibaldi
 
Expanded and extended role of pediatric nurse
Expanded and extended role of pediatric nurseExpanded and extended role of pediatric nurse
Expanded and extended role of pediatric nurse
mohanasundariskrose
 
Guidance and counseling
Guidance and counselingGuidance and counseling
Guidance and counseling
pea school
 
Guidance and counselling services
Guidance and counselling servicesGuidance and counselling services
Guidance and counselling services
yusnithamerang
 
Disaster nursing
Disaster nursingDisaster nursing
Disaster nursing
Jini Babu
 
Disaster nursing
Disaster nursingDisaster nursing
Disaster nursing
Nursing Path
 
Expanded role of nurses
Expanded role of nursesExpanded role of nurses
Expanded role of nurses
Napoleon Abonales
 
Extended and expanded role of nurse
Extended and expanded role of nurseExtended and expanded role of nurse
Extended and expanded role of nurse
ramanlal patidar
 
robot programming and its evolution
robot programming and its evolutionrobot programming and its evolution
robot programming and its evolution
zeeshan_ahmed9382
 
Disaster management and role of nurse
Disaster management and role of nurseDisaster management and role of nurse
Disaster management and role of nurse
AIIMS, Rishikesh
 

Viewers also liked (20)

Disater
DisaterDisater
Disater
 
PW_thesis_defense
PW_thesis_defensePW_thesis_defense
PW_thesis_defense
 
soft robotics with kings and craft council
soft robotics with kings and craft councilsoft robotics with kings and craft council
soft robotics with kings and craft council
 
soft robots
soft robotssoft robots
soft robots
 
Innovative trends in robotics
Innovative trends in roboticsInnovative trends in robotics
Innovative trends in robotics
 
Soft robotics
Soft roboticsSoft robotics
Soft robotics
 
Design and Implementation of Soft-i-Robot for face Detection and Obstacle Avo...
Design and Implementation of Soft-i-Robot for face Detection and Obstacle Avo...Design and Implementation of Soft-i-Robot for face Detection and Obstacle Avo...
Design and Implementation of Soft-i-Robot for face Detection and Obstacle Avo...
 
[131] 소프트로봇 박용래
[131] 소프트로봇 박용래[131] 소프트로봇 박용래
[131] 소프트로봇 박용래
 
The evolution of robots
The evolution of robotsThe evolution of robots
The evolution of robots
 
Lecture
LectureLecture
Lecture
 
Mind-Controlled Prosthetics, by Matthew Garibaldi
Mind-Controlled Prosthetics, by Matthew GaribaldiMind-Controlled Prosthetics, by Matthew Garibaldi
Mind-Controlled Prosthetics, by Matthew Garibaldi
 
Expanded and extended role of pediatric nurse
Expanded and extended role of pediatric nurseExpanded and extended role of pediatric nurse
Expanded and extended role of pediatric nurse
 
Guidance and counseling
Guidance and counselingGuidance and counseling
Guidance and counseling
 
Guidance and counselling services
Guidance and counselling servicesGuidance and counselling services
Guidance and counselling services
 
Disaster nursing
Disaster nursingDisaster nursing
Disaster nursing
 
Disaster nursing
Disaster nursingDisaster nursing
Disaster nursing
 
Expanded role of nurses
Expanded role of nursesExpanded role of nurses
Expanded role of nurses
 
Extended and expanded role of nurse
Extended and expanded role of nurseExtended and expanded role of nurse
Extended and expanded role of nurse
 
robot programming and its evolution
robot programming and its evolutionrobot programming and its evolution
robot programming and its evolution
 
Disaster management and role of nurse
Disaster management and role of nurseDisaster management and role of nurse
Disaster management and role of nurse
 

Similar to presentation

2018AOI論壇_深度學習於表面瑕疪檢測_元智大學蔡篤銘
2018AOI論壇_深度學習於表面瑕疪檢測_元智大學蔡篤銘2018AOI論壇_深度學習於表面瑕疪檢測_元智大學蔡篤銘
2018AOI論壇_深度學習於表面瑕疪檢測_元智大學蔡篤銘
CHENHuiMei
 
OpenCV.pdf
OpenCV.pdfOpenCV.pdf
OpenCV.pdf
sagarawasthi5
 
PPT s06-machine vision-s2
PPT s06-machine vision-s2PPT s06-machine vision-s2
PPT s06-machine vision-s2
Binus Online Learning
 
Parking space detect
Parking space detectParking space detect
Parking space detect
Amanullah Tariq
 
3DSensing.ppt
3DSensing.ppt3DSensing.ppt
3DSensing.ppt
TejaReddy453140
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
shabanam tamboli
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.ppt
ShabanamTamboli1
 
DSP presentation_latest
DSP presentation_latestDSP presentation_latest
DSP presentation_latest
Haowei Jiang
 
Intro+Imaging.ppt
Intro+Imaging.pptIntro+Imaging.ppt
Intro+Imaging.ppt
shohel rana
 
QR code decoding and Image Preprocessing
QR code decoding and Image Preprocessing QR code decoding and Image Preprocessing
QR code decoding and Image Preprocessing
Hasini Weerathunge
 
Designed by Identity MLP
Designed by Identity MLP Designed by Identity MLP
Designed by Identity MLP
butest
 
426 Lecture5: AR Registration
426 Lecture5: AR Registration426 Lecture5: AR Registration
426 Lecture5: AR Registration
Mark Billinghurst
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
Azharo7
 
Steganography Part 2
Steganography Part 2Steganography Part 2
Steganography Part 2
Heethesh Vhavle
 
Analyzing color imaging failure on consumer-grade cameras
Analyzing color imaging failure on consumer-grade camerasAnalyzing color imaging failure on consumer-grade cameras
Analyzing color imaging failure on consumer-grade cameras
SaiTedla1
 
05 contours seg_matching
05 contours seg_matching05 contours seg_matching
05 contours seg_matching
ankit_ppt
 
Data compression
Data compressionData compression
Data compression
Sherif Abdelfattah
 
Introduction To Digital image Processing
Introduction To Digital image ProcessingIntroduction To Digital image Processing
Introduction To Digital image Processing
MohamedFathy132015
 
DTAM: Dense Tracking and Mapping in Real-Time, Robot vision Group
DTAM: Dense Tracking and Mapping in Real-Time, Robot vision GroupDTAM: Dense Tracking and Mapping in Real-Time, Robot vision Group
DTAM: Dense Tracking and Mapping in Real-Time, Robot vision Group
Lihang Li
 
DALL-E.pdf
DALL-E.pdfDALL-E.pdf
DALL-E.pdf
dsfajkh
 

Similar to presentation (20)

2018AOI論壇_深度學習於表面瑕疪檢測_元智大學蔡篤銘
2018AOI論壇_深度學習於表面瑕疪檢測_元智大學蔡篤銘2018AOI論壇_深度學習於表面瑕疪檢測_元智大學蔡篤銘
2018AOI論壇_深度學習於表面瑕疪檢測_元智大學蔡篤銘
 
OpenCV.pdf
OpenCV.pdfOpenCV.pdf
OpenCV.pdf
 
PPT s06-machine vision-s2
PPT s06-machine vision-s2PPT s06-machine vision-s2
PPT s06-machine vision-s2
 
Parking space detect
Parking space detectParking space detect
Parking space detect
 
3DSensing.ppt
3DSensing.ppt3DSensing.ppt
3DSensing.ppt
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.ppt
 
DSP presentation_latest
DSP presentation_latestDSP presentation_latest
DSP presentation_latest
 
Intro+Imaging.ppt
Intro+Imaging.pptIntro+Imaging.ppt
Intro+Imaging.ppt
 
QR code decoding and Image Preprocessing
QR code decoding and Image Preprocessing QR code decoding and Image Preprocessing
QR code decoding and Image Preprocessing
 
Designed by Identity MLP
Designed by Identity MLP Designed by Identity MLP
Designed by Identity MLP
 
426 Lecture5: AR Registration
426 Lecture5: AR Registration426 Lecture5: AR Registration
426 Lecture5: AR Registration
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Steganography Part 2
Steganography Part 2Steganography Part 2
Steganography Part 2
 
Analyzing color imaging failure on consumer-grade cameras
Analyzing color imaging failure on consumer-grade camerasAnalyzing color imaging failure on consumer-grade cameras
Analyzing color imaging failure on consumer-grade cameras
 
05 contours seg_matching
05 contours seg_matching05 contours seg_matching
05 contours seg_matching
 
Data compression
Data compressionData compression
Data compression
 
Introduction To Digital image Processing
Introduction To Digital image ProcessingIntroduction To Digital image Processing
Introduction To Digital image Processing
 
DTAM: Dense Tracking and Mapping in Real-Time, Robot vision Group
DTAM: Dense Tracking and Mapping in Real-Time, Robot vision GroupDTAM: Dense Tracking and Mapping in Real-Time, Robot vision Group
DTAM: Dense Tracking and Mapping in Real-Time, Robot vision Group
 
DALL-E.pdf
DALL-E.pdfDALL-E.pdf
DALL-E.pdf
 

presentation

Editor's Notes

  1. Ok, thanks Li sun, I will simply explain the what’s the image preprocessing in our works. Each box have a unique number, we are trying to use it to classify the box.
  2. Ok ,I will show the image preprocessing workflow by a good sample. Remember it’s a good sample. Consists of 6 steps. Because the logo is a red square. It will narrow down the search area.
  3. Opencv provided a useful implementation, we just need to use it.
  4. Using the image moments to calculate some geometric attribution(area, perimeter). I don’t really want to closely explain How to do that?
  5. Quadrilateral must have 4 corners, no more, no less. About sorting, we use some a small trick to make the points always be sorted clockwise.
  6. The length and location of this square determined by the quadrilateral we detected.
  7. And we can get a good result now.
  8. Ok, let’s review key techniques. Is that finish? Of corse not, I said this is a good sample before. So if we have a bad sample, what will happen??
  9. Now, In here, we choose the rotated box, The first 4 steps are same with the last image. But when we finding and sorting the 4 corners, did you see any difference?
  10. Let’s mark these 4 points in the image.
  11. Next step, let’s create a square and mark the four corners of this square. What will happen if we use these eight corners to calculate the transformation matrix and recover the image?
  12. We will get a orthogonal result comparing with the standard form. Why that happen? Because we just know corner points are clockwise sorting, we don’t know the absolutely correct corners position. Got it? But anyway, we have a orthogonal result now.
  13. How can we overcome this and get a correct result. We used feature points matching. We try to crop the vertical logo and matching the feature points with the standard logo image.
  14. Some people probably will ask, why don’t use the matching points to calculate the transformation matrix directly? Because the matching points are not always correct, many of these points are wrong matching. we can only use matching points to get a very roughly result It’s not accurate enough for transformation matrix. But if we add the previous result. we just need to judge these roughly result is 0, 90, 180, -90. Previous result is vertical or parallel with the correct result. So that’s why we do that.
  15. I will show a short video. You can see, This algorithm performed good. It could against the scaling rotation and perspective transform and recover the image to what we want. it does work