image

Developed a machine learning (ML) model for edge detection and feature identification of military aircraft using Histogram of Oriented Gradients (HOG) and Scale-Invariant Feature Transform (SIFT) algorithms. The model leverages OpenCV for real-time feature extraction, keypoint matching, and object detection, ensuring robust identification across varying lighting conditions, perspectives, and image resolutions.

image image

  • Implemented HOG for edge detection and Leddar PixSet, enabling feature extraction from military aircraft images.
  • Used VoteNet algorithm.
  • Converted 2D images to 3D point cloud data.
  • Implemented HOG for edge detection, enabling feature extraction from military aircraft images.
  • Used SIFT for detecting and matching key points across different images of the same aircraft model.
  • Applied OpenCV for real-time image recognition and object identification.

Code Block Example for HOG Algorithm:

You can get more info at A Gentle Introduction Into The Histogram Of Oriented Gradients.

									    
import cv2
import numpy as np
from skimage.feature import hog
import matplotlib.pyplot as plt

# Load image and convert to grayscale
image = cv2.imread("aircraft.jpg")
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)

# Compute HOG features
hog_features, hog_image = hog(gray, orientations=9, pixels_per_cell=(8, 8),
			cells_per_block=(2, 2), visualize=True, block_norm='L2-Hys')

# Display original image and HOG representation
plt.figure(figsize=(10, 5))
plt.subplot(1, 2, 1)
plt.title("Original Image")
plt.imshow(gray, cmap='gray')

plt.subplot(1, 2, 2)
plt.title("HOG Edge Detection")
plt.imshow(hog_image, cmap='gray')
plt.show()				
									    
								    

Technical Details

HOG for Edge Detection: Implemented HOG to extract gradient-based features, enhancing the ability to detect the structural edges of aircraft. This method computes gradient orientations in localized regions, making it effective for distinguishing aircraft contours from the background.

SIFT for Feature Matching: Applied SIFT to detect scale-invariant keypoints and generate descriptors that facilitate robust matching across multiple images of the same aircraft model. The SIFT pipeline involved:

  • Difference of Gaussian (DoG) for blob detection.
  • Keypoint localization with contrast thresholding.
  • Orientation assignment for rotational invariance.
  • Descriptor generation based on gradient histograms.

Real-Time Image Recognition with OpenCV:

  • Used OpenCV’s cv2.SIFT_create() and cv2.HOGDescriptor() to preprocess and extract features efficiently.
  • Employed FLANN-based matcher and Brute-Force Matcher (BFMatcher) to match keypoints between reference images and live input frames.
  • Optimized computational efficiency by reducing feature vector dimensionality and leveraging OpenCV's GPU acceleration.

image image

Code Block Example for SIFT Algorithm

You can get more info at Introduction to SIFT(Scale Invariant Feature Transform).

									    
import cv2
import matplotlib.pyplot as plt

# Load image
image = cv2.imread("aircraft.jpg")
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)

# Initialize SIFT detector
sift = cv2.SIFT_create()

# Detect keypoints and compute descriptors
keypoints, descriptors = sift.detectAndCompute(gray, None)

# Draw keypoints on the image
image_sift = cv2.drawKeypoints(gray, keypoints, None, flags=cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)

# Display SIFT keypoints
plt.figure(figsize=(10, 5))
plt.title("SIFT Keypoints Detection")
plt.imshow(image_sift, cmap='gray')
plt.show()
										
									    
								    

    Things learnt during this internship:

  • Edge detection & feature extraction using HOG and SIFT
  • Object recognition using OpenCV and ML-based techniques
  • Training and analyzing datasets for military aircraft detection
  • Real-time image processing for enhanced feature identification
  • Working in high-tech research environments and optimizing algorithms for practical use cases

This approach provided a scalable solution for automated aircraft recognition, which could be further extended for aerial surveillance, defense applications, and UAV-based reconnaissance systems.