Image Processing 100 Questions

June 10, 2019 · View on GitHub


This is the English version of image processing 100 questions. The original Japanese repository was created by yoyoyo-yo. It’s updated by him now. To be honest, I can not speak Japanese. Since the code is language independent and I’m preparing for my interview questions about computer vision now. I decided to translate the English version of this 100 questions.

Hope this could help more people and thanks for yoyoyo-yo's great effort.

I'm currently working on ROS and OpenCV, so I'm updating another repository: OpenCV_for_Beginners. Please feel free to fork and pull request.

Before Reading

  1. I’ll use the Google translator to help me understand his original meaning. Pretty cool, right? It’s the time for NLP.

  2. I may add some additional materials and my own opinions to this repository.

  3. I’ll discard the irrelevant parts and mainly focus on the OpenCV parts.

  4. I’ll update this as soon as possible since I have to do my research project now.

Environment Setting

  1. Go to Miniconda website, download and install it.

  2. Open your terminal, create a virtual environment using following command:

    $ conda create python = 3.6 -n Image_Processing_100
    
  3. Activate your virtual environment:

    $ source activate Image_Processing_100
    
  4. Install the packages:

    $ pip install -r requirement.txt
    

Testing Your Environment

  1. Clone this repository into your local computer:

    $ git clone git@github.com:KuKuXia/Gasyori100knock.git
    
  2. In the Image_Processing_100_Questions folder, make a new file named sample.py, copy and paste the following code:

    import cv2
    
    img = cv2.imread("assets/imori.jpg")
    cv2.imshow("imori", img)
    cv2.waitKey(0)
    cv2.destroyAllWindows()
    
  3. Save the file and run it.

    python ./sample.py
    
  4. Successful if the following image is displayed with a new window! Then if you press any button, it disappears.

  1. Next, see the Tutorial folder to learn numpy related to image processing. (Please skip this if you already know.)

  2. From now on, please solve the Question. The Question contents are included in each folder. Please use assets/imori.jpg in the question. Questions are written in the README.md of each folder.

Content

​ Question >> Folder

  • Question 1 - 10 >> Question_01_10
  • Question 11 - 20 >> Question_ 11 _ 20
  • Question 21 - 30 >> Question_ 21 _ 30
  • Question 31 - 40 >> Question_ 31 _ 40
  • Question 41 - 50 >> Question_ 41 _ 50
  • Question 51 - 60 >> Question_ 51 _ 60
  • Question 61 - 70 >> Question_ 61 _ 70
  • Question 71 - 80 >> Quesiton_ 71 _ 80
  • Question 81 - 90 >> Question_ 81 _ 90
  • Question 91 - 100 >> Question_ 91 _ 100

Note

  • This paper is a teaching material to learn fundamental knowledge and theory of image processing.
  • In the solution, we do not use main () etc. to simplify the code as much as possible.
  • We will use numpy, but we do not post basic knowledge about numpy. Please check each one.

Question

Unresolved issues are unanswered

Question 1-10

NumberQuestionNumberQuestion
1Channel swapping6Discretization of Color
2Grayscale7Average Pooling
3Binarization8Max Pooling
4Binarization of Otsu9Gaussian Filter
5HSV Conversion10Median Filter

Question 11 - 20

NumberQuestionNumberQuestion
11Smoothing Filter16Prewitt Filter
12Motion Filter17Laplacian Filter
13MAX_MIN Filter18Emboss Filter
14Differential Filter19LoG Filter
15Sobel Filter20Histogram Display

Question 21 - 30

NumberQuestionNumberQuestion
21Histogram Normalization26Bi-linear Interpolation
22Histogram Operation27Bi-cubic Interpolation
23Histogram Equalization28Affine transformation (Translation)
34Gamma Correction29Affine transformation (Scaling)
25Nearest Neighbor Interpolation30Affine transformation (Rotation)v_1, v_2

Question 31 - 40

NumberQuestionNumberQuestion
31Affine Transformation(Skew)36JPEG Compression (Step 1) Discrete Cosine Transform
32Fourier Transfrom37PSNR
33Fourier Transform Low Pass Filter38JPEG Compression (Step 2) DCT + Quantization
34Fourier Transform High Pass Filter39JPEG Compression (Step 3) YCbCr Color System
35Fourier Transform Band Pass Filter40JPEG Compression (Step 4) YCbCr + DCT + Quantization

Question 41 - 50

NumberQuestionNumberQuestion
41Canny Edge Detection (Step 1) Edge Magnitude46Hough Transform / Line Detection (Step. 3) Hough Inverse Transform
42Canny Edge Detection (Step 2) Thinning47Morphological Processing (Expansion)
43Canny Edge Detection (Step 3) Hysteresis Threshold Processing48Morphology Processing (Erosion)
44Hough Transform / Line Detection (Step. 1) Hough Transform49Opening Processing
45Hough Transformation / Line Detection (Step. 2) NMS50Closing Processing

Question 51 - 60

NumberQuestionNumberQuestion
51Morphology gradient56Template matching NCC
52Top hat conversion57Template matching ZNCC
53Black hat conversion58Labeling 4 Near
54Template matching SSD59Labeling 8 neighborhood
55Template matching SAD60Alpha Blend

Question 61 - 70

NumberProblemNumberProblem
614-connected number66HOG (Step 1) Gradient intensity · Gradient angle
628 - number of connections67HOG (Step 2) gradient histogram
63Thinning68HOG (Step 3) Histogram normalization
64 not yetHiruditchi thinning69HOG (Step 4) Drawing feature quantity
65Zhang-Suen thinning70Color tracking

Problem 71 - 80

NumberProblemNumberProblem
614-connected number66HOG (Step 1) Gradient intensity · Gradient angle
628 - number of connections67HOG (Step 2) gradient histogram
63Thinning68HOG (Step 3) Histogram normalization
64 not yetHiruditchi thinning69HOG (Step 4) Drawing feature quantity
65Zhang-Suen thinning70Color tracking

TODO

Hough, Gabor, adaptivebinalizatino