Fading Coder

One Final Commit for the Last Sprint

Multimedia Processing and Debugging with OpenCV, PIL, and IPython

Negative Log-Likelihood Loss Mechanics The nn.NLLLoss criterion evaluates classification performance by measuring the negative log-probability assigned to correct classes. Given unnormalized model outputs $z$, the loss first applies the log-softmax operatino: $$\text{log-softmax}(z_i) = z_i - \log\s...

OpenCV Image Processing: I/O Operations, Spatial Manipulation, and Channel Management

OpenCV stores digital images as multi-dimensional NumPy arrays, with pixel intensities typically ranging from 0 to 255. Color images follow the BGR channel ordering by default, comprising three matrices representing blue, grean, and red intensities. Media Input Operations Reading static images utili...

Stereo Camera Calibration and Image Acquisition for Computer Vision

Implementing a stereo vision system for distance estimation involves a multi-stage pipeline. The process typically begins with camera calibration to resolve lens ditsortion and determine spatial relationships between the dual sensors. Following calibration, Semi-Global Block Matching (SGBM) is used...

Box Filtering and Separable Filters in OpenCV

Box Filtering Box filtering computes the mean or sum of pixel values within a rectangular neighborhood. The boxFilter function handles normalization, while sqrBoxFilter processes squared pixel values. #include <opencv2/opencv.hpp> #include <iostream> using namespace cv; using namespace s...

Compilation and Configuration of OpenCV 3.3.0 with Qt 5.9.1, CMake 3.18.5 and Visual Studio 2015

Pre-configuration Preparation Install Visual Studio 2015, Qt 5.9.1 and CMake 3.18.5, then extract the OpenCV 3.3.0 source package to a local directory. Configure the required system environment variables before proceeding with compilation. If you use the CMake executable installer, check the "A...

Building OpenCV 3.1.0 from Source for Visual SLAM Applications

To compile OpenCV 3.1.0 successfully on modern Ubuntu systems for use with Visual SLAM projects, follow these corrected steps to resolve common dependency and build-time issues. Step 1: Install Required System Dependencies Begin by installing essential libraries. Due to package version changes in ne...

Fundamental Image Processing Techniques Using OpenCV and Python

Core Image I/O and Channel Manipulation Loading visual data and managing color channels are foundational steps. OpenCV defaults to BGR ordering, requiirng explicit channel management for RGB workflows. import cv2 import numpy as np def demonstrate_channel_operations(): source_path = "sample_ima...

Basic Image Operations with C++ and OpenCV

Reading Images In OpenCV, the cv::imread() function is used to load images from a file. This function returns a cv::Mat object, which is the primary data structure in OpenCV for storing image data. // Load a color image cv::Mat imgData = cv::imread("sample_image.png", cv::IMREAD_COLOR); Th...

Implementing License Plate Recognition with STM32 Microcontrollers

STM32 microcontrollers are widely used in embedded system development due to their robust performance and extensive peripheral support. This article explores the implementation of a license plate recognition system using an STM32 platform, focusing on the core image processing stages. License plate...

Encoding and Decoding Images in OpenCV-Python with cv2.imencode and cv2.imdecode

OpenCV provides two complementary utilities for converting between raw byte streams and image matrices: cv2.imdecode: turns a byte buffer (e.g., data received over a network) into a decoded image array. cv2.imencode: compresses an image array into a specific file format and returns the encoded bytes...