
Fourier Transform for Object Detection¶
Faisal Qureshi
Professor
Faculty of Science
Ontario Tech University
Oshawa ON Canada
http://vclab.science.ontariotechu.ca
Copyright information¶
© Faisal Qureshi
License¶
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
Introduction¶
This lab explores object detection using Fourier Transform in the frequency domain. Instead of traditional spatial domain methods (e.g., template matching, feature extraction), we leverage Fourier cross-correlation to detect objects in an image.
Key Concepts¶
- Fourier Transform: Converts an image from spatial to frequency domain.
- Cross-Correlation in Fourier Space: Detects objects by comparing the frequency content of an image and a template.
- Inverse Fourier Transform: Converts the result back to the spatial domain for visualization.
Recipe¶
Given an image I and a template T
- Load the image and template
- Compute Fourier Transform of the image and the template
- Compute cross-correlation in Fourier Space
- Compute inverse Fourier Transform to get spatial domain correlation
- Find peak detection for object localization
- (Optional) How would you deal with rotations?
Starter Code¶
Check out the sample code at https://csundergrad.science.uoit.ca/courses/cv-notes/notebooks/05-frequency-analysis.html to get started.
Dataset¶
I got the following images from unsplash.com. We use these images for educational purposes only. Let's see if we are able to count lemons in the last three images. The first two images can serve as our templates. Images by Francesco Cantinelli, Hanne Hoogendam, Angelica Echeverry, and eStudio Bloom.





Submission¶
Your lab will be marked based upon steps 1 to 5 above. I am under no illusion that we will be able to count lemons. Submit via canvas.
