Skip to content

nh9k/Computer-vision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Computer_vision

This is the source code that summarizes the codes that I have gathered while attending Professor Sungho Kim's class (Yeungnam University, computer vision class) and my personal studies.

0. Outline

1. Install OpenCV
2. Camera Distortion
3. Color Space
4. Image Filtering
5. Edge
6. Corner and Blob detector
7. Fitting
8. Calibration
9. Stereo Matching and Rendering
10. Face and body detection

1. Install OpenCV

  • I installed OpenCV version(2.4.13.6)
  • Environment variables: C:\opencv24136\build\x86\vc14\bin;
  • VS Setting
    • Include Directories
      • C:\OpenCV24136\build\Include
    • Library Directories
      • C:\opencv24136\build\x86\vc14\lib
    • Additional Dependencies
      • opencv_calib3d2413d.lib; opencv_contrib2413d.lib; opencv_core2413d.lib; opencv_features2d2413d.lib; opencv_flann2413d.lib; opencv_gpu2413d.lib; opencv_highgui2413d.lib; opencv_imgproc2413d.lib; opencv_legacy2413d.lib; opencv_ml2413d.lib; opencv_nonfree2413d.lib; opencv_objdetect2413d.lib; opencv_ocl2413d.lib; opencv_photo2413d.lib; opencv_stitching2413d.lib; opencv_superres2413d.lib; opencv_ts2413d.lib; opencv_video2413d.lib; opencv_videostab2413d.lib;

Go 0. Outline

2. Camera Distortion

  • Result
INPUT OUTPUT
soccer_distortion 2_camera_distortion_result

Go 0. Outline

3. Color Space

  • Result
INPUT OUTPUT(Blue) OUTPUT(Green) OUTPUT(Red)
corni_fructus 3_color_blue 3_color_green 3_color_red
  • Another result
INPUT OUTPUT(Blue) OUTPUT(Green) OUTPUT(Red)
  • Input color
INPUT OUTPUT(Blue) OUTPUT(Green) OUTPUT(Red)
  • Builtin function vs Implementation (RGB to Gray)
INPUT OUTPUT(Builtin) OUTPUT(Implementation)
  • Builtin function vs Implementation (RGB to HSI)
INPUT OUTPUT(Builtin-HSV) OUTPUT(Implementation-HSI)
  • HSI(Hue, Saturation, Intensity) of Implementation
Hue Saturation Intensity
  • Builtin function vs Implementation (RGB to HSV)
INPUT OUTPUT(Builtin-HSV) OUTPUT(Implementation-HSV)
  • HSV(Hue, Saturation, Value) of Implementation
Hue Saturation Value

Go 0. Outline

4. Image Filtering

  • Blur Result(Smoothed Image)
INPUT OUTPUT(Kernel 1X1) OUTPUT(Kernel 3X3) OUTPUT(Kernel 5X5)
OUTPUT(Kernel 11X11) OUTPUT(Kernel 19X19) OUTPUT(Kernel 25X25) OUTPUT(Kernel 29X29)
  • Salt & Pepper Result(Filtered Image Median vs Gaussian)
INPUT OUTPUT(Salt&Pepper Noised)
OUTPUT(Median Filtered 1X1) OUTPUT(Gaussian Filtered 1X1)
OUTPUT(Median Filtered 3X3) OUTPUT(Gaussian Filtered 3X3)
OUTPUT(Median Filtered 5X5) OUTPUT(Gaussian Filtered 5X5)
OUTPUT(Median Filtered 7X7) OUTPUT(Gaussian Filtered 7X7)
OUTPUT(Median Filtered 9X9) OUTPUT(Gaussian Filtered 9X9)
  • Salt & Pepper Result(Filtered Image Sigma of Gaussian)
OUTPUT(sigmaX, sigmaY = 1) OUTPUT(sigmaX, sigmaY = 3) OUTPUT(sigmaX, sigmaY = 5)
  • Gaussian Noised Result(Filtered Image Median vs Gaussian)
Gaussian Noise Gaussian Kernel example
OUTPUT(Median Filtered 1X1) OUTPUT(Gaussian Filtered 1X1)
INPUT OUTPUT(Gaussian Noised)
OUTPUT(Median Filtered 1X1) OUTPUT(Gaussian Filtered 1X1)
OUTPUT(Median Filtered 3X3) OUTPUT(Gaussian Filtered 3X3)
OUTPUT(Median Filtered 5X5) OUTPUT(Gaussian Filtered 5X5)
OUTPUT(Median Filtered 7X7) OUTPUT(Gaussian Filtered 7X7)
OUTPUT(Median Filtered 9X9) OUTPUT(Gaussian Filtered 9X9)
  • Gaussian Noised Result(Filtered Image Sigma of Gaussian)
OUTPUT(sigmaX, sigmaY = 1) OUTPUT(sigmaX, sigmaY = 3) OUTPUT(sigmaX, sigmaY = 5)

Go 0. Outline

5. Edge

  • Canny edge
INPUT OUTPUT
  • Canny edge another Result
INPUT OUTPUT(Min Threshold0)
OUTPUT(Min Threshold25) OUTPUT(Min Threshold50)
OUTPUT(Min Threshold75) OUTPUT(Min Threshold100)
  • Sobel edge
X direction Y direction
Magnitude(X+Y) Direction(X,Y)

Go 0. Outline

6. Corner and Blob detector

  • Harris Corner Detector
    • Threshold LOW = Detected Corners MANY
INPUT OUTPUT
  • SIFT(blob) detector
INPUT OUTPUT

Go 0. Outline

7. Fitting

  • find "good" matches
    • ex. (Method) LMEDS
INPUT OUTPUT(Object)
INPUT OUTPUT(Scene)
OUTPUT(Good matches & Object detection)
  • Homography Estimation
    • Method(0, RANSAC, LMEDS) of fineHomography function
0(object) RANSAC(object) LMEDS(object)
0(Scene) RANSAC(Scene) LMEDS(Scene)
0(Good matches & Object detection) RANSAC(Good matches & Object detection) LMEDS(Good matches & Object detection)

Go 0. Outline

8. Calibration

  1. Pring Checkerboard
  2. Using CamCalibrator tool of Darkpgmr
  3. Check Calibrate and Calculate focal length of your camera

Go 0. Outline

9. Stereo Matching and Rendering

  • Block matching based Disparity
INPUT(Left) INPUT(Right)
OUTPUT(Support 5) OUTPUT(Support 7)
OUTPUT(Support 9) OUTPUT(Support 11)
OUTPUT(Support 15) OUTPUT(Support 17)
OUTPUT(Support 19) OUTPUT(Support 21)
  • 3D Rendering OUTPUT
x,y,z Depth Image Result
0,0,140
56,0,140
-42,0,140
0,0,0
  • Texture mapping on the 3D shape
    • Using OpenGL
INPUT OUTPUT(No move)
OUTPUT(move) OUTPUT(inner)

ezgif com-gif-maker

Go 0. Outline

10. Face and body detection

INPUT OUTPUT

Go 0. Outline

Image Source

searching at google, matlab, nanhee kim's and sungho kim class

colorful stock
corni_fructus
earth
colorful star: searching at google
Rhone River(Vincent Van Gogh): searching at google
Lemona, myimg(nanhee kim): nanhee kim
others(prof.sungho kim class): matlab and prof.sungho kim

Author

Nanhee Kim / @nh9k