XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

OpenCV - Latest posts

Latest posts

Understanding Weighted Image Blending in OpenCV

Hello everyone, I am learning image processing using Python and OpenCV. I am working on an assignment where I need to blend two images using the cv2.addWeighted() function. I understand that the weight of the first image increases from 0 to 1, while the weight of the second image decreases from 1 to 0. My question is: Why do both images need to have the same dimensions when using cv2.addWeighted(), and what happens if their dimensions are different? I would appreciate any explanation. Thank you!

Multi-Camera Person Tracking: How to Maintain a Persistent ID Across Non-Overlapping CCTV Cameras?

For non-overlapping cameras, keep ByteTrack’s IDs local and add a route-aware global association step: compare each new track’s ReID embedding with the global-ID gallery, but only consider camera transitions and travel-time windows that are plausible. A one-to-one assignment per batch can help avoid giving the same global ID to multiple simultaneous tracks; tune the thresholds on labeled camera transitions.

How reliable is image matching after compression and resizing?

One thing I’d be careful about is treating a high number of RANSAC inliers as sufficient proof that two images come from the same source. Repeated patterns, logos, text blocks and similar UI layouts can produce convincing local matches even when the full images are different. Besides counting inliers, I’d look at how well those matches are distributed across the overlapping image area. If almost all the matches come from one small logo in the corner, that’s much weaker evidence than matches…

How reliable is image matching after compression and resizing?

SIFT holds up well to resizing, compression and moderate cropping. ORB is faster but weaker once the image is heavily recompressed or the scale changes a lot. For “is it the same source” the usual pattern is two stages. First a cheap filter to find candidates, either a perceptual hash (pHash or dHash) or small CNN embeddings searched with FAISS. Then verify the few candidates with local features: SIFT (or ORB if you need speed), Lowe’s ratio test at around 0.75, then a RANSAC homography or…

Heap error from cvtColor

For the wxImage version, GetData() is RGB, so use cv::COLOR_RGB2GRAY for the intended grayscale conversion. That changes the color interpretation, but it doesn’t explain why the imread version also reports the error. The Mat constructor wrapping GetData() doesn’t copy or own the pixels. Keep the wxImage and its data alive and unchanged for as long as the Mat uses them. Also check the row stride when wrapping any raw buffer: Mat’s default step assumes tightly packed rows (width × 3 bytes here).…

Plate OCR from RTSP cameras at night: what actually helped you most?

Thanks both, this is helpful. Rachel, voting on the whole string makes sense, and “3 identical reads out of 5 sharp frames” is a simple rule that is easy to explain to users. Charles, good idea on the polarizer. One practical note: a polarizing filter usually costs one to two stops of light, so with the shutter fixed you would need to raise the illuminator level or gain to compare fairly. Retroreflective plate film may also scramble polarization, so the gain could be smaller than with ordinary…

Toolbar Definition

For the built-in Qt toolbar, start with modules/highgui/src/window_QT.cpp in the OpenCV source matching your build. That’s where the Qt HighGUI window is implemented. To modify its toolbar, you’ll need to change OpenCV and rebuild it. For application controls, consider using your own Qt main window and callbacks. If buttons in a separate control panel would do, check cv::createButton. It adds a button to the Qt control panel, not directly to the image window’s toolbar. The OpenCV Qt HighGUI…

PulsePatch: reducing motion in short app animations

I should have explained Lottie first. It’s a JSON format for animations in apps and websites. Imagine a short instruction showing a document moving into a folder, then a check mark. A single paused frame can miss the steps that explain what happened. PulsePatch lets the author keep a few frames and export a version with less movement, while keeping the shapes editable. I’ve rewritten the post with that example.

PulsePatch: reducing motion in short app animations

PulsePatch makes a version of a short instructional animation with less movement, while keeping a few steps from the original. It works with Lottie, a JSON file format used for animations in apps and on websites. For example, an animation might show a document moving into a folder, followed by a check mark. If you pause on the final frame, you lose the earlier steps. In PulsePatch, the author uploads the animation, describes what it should communicate, and reviews up to three suggested frames.…

Commercial software redistribution — OpenCV FFmpeg component

Subject: Commercial software redistribution — OpenCV FFmpeg component Hello, I own Ray of Light Publishing LLC, and we distribute a commercial Windows application called Family Video Historian. Our application includes the OpenCV component opencv_videoio_ffmpeg500_64.dll. We want to comply with the applicable open-source licensing requirements. Could you please tell us exactly what source code, build information, license notices, and other materials we need to provide to customers when…

Image preprocessing for OCR on glossy, curved and unevenly illuminated packaging

For mixed lighting I would stop looking for one pipeline and let measurements pick the path. Score each photo first. Blur: variance of the Laplacian on the text region. Glare: share of pixels above about 250 in the grey image, plus a mask of high brightness and low saturation in HSV. Evenness: compare the mean of the brightest and darkest tiles. If blur is under your threshold, or glare covers the text, reject the photo and ask for another one. Retaking is often cheaper than repairing. Run OCR…

SegFormer-B2 on Jetson AGX: improving FPS and reducing false traversable predictions

I’d try two separate changes and measure each against the current FP16 baseline. First, try INT8 quantization with a representative calibration set from your actual camera and terrain, using the workflow supported by your TensorRT version. Compare end-to-end latency as well as engine time, and check per-class accuracy and obstacle false-traversable errors. An INT8 engine isn’t guaranteed to reach 40–50 FPS or preserve accuracy. For reliability, align the ZED depth to the left image and map it…

Plate OCR from RTSP cameras at night: what actually helped you most?

One more experiment for the white-box problem: try a polarizer rated for the illuminator’s IR wavelength, with polarizing film on the light and a rotatable filter on the lens. Compare plate crops with and without it at the same exposure. Retroreflective return may not respond like ordinary glare, and the filter also costs light, so it may not help this setup. Keep the shutter limit suggested above fixed for the comparison, and check whether the characters are actually less clipped and still…

Multi-View CCTV Pallet Counting: Resolving Interlocking Layer Occlusion via Calibrated Ground Plane & Homography

You could add an aspect-ratio prior to the layer occupancy approach: measure bundle length and width from clearly visible examples, then compare candidate transverse layouts with the visible box or mask shapes in both cameras. Use the calibrated cameras to project each candidate at its proposed tier height back into each image. Score the fit only where the bundle is visible, leaving column-occluded pixels unknown. A floor homography is useful for floor contacts, but applying it to elevated box…

Plate OCR from RTSP cameras at night: what actually helped you most?

Thanks, this is very useful. The point about the white box being IR bouncing off the retroreflective film, and fixing it at the camera before touching software, is the part many people skip. Two follow-up questions if you have time: When you majority-vote across frames, do you vote per character position, or on the whole plate string? I can see per-character failing when the plate length changes between frames. How many sharp frames do you usually need before you trust a result? Is there a rule…

Plate OCR from RTSP cameras at night: what actually helped you most?

Camera settings usually move the read rate more than another software stage. The white-box plate is IR bouncing off the retroreflective film, so drop the IR level or switch to a short burst of white light with the IR cut in, and aim a few degrees off head-on so the return is not straight into the lens. Lock the shutter around 1/500 to 1/1000 before you raise gain; once a 40 to 60 px plate is motion-blurred, deblur and super-resolution mostly invent strokes. I would OCR the main stream, or a…

Plate OCR from RTSP cameras at night: what actually helped you most?

I work on a plate and text reading tool for CCTV cameras (it is called VisuDock Live OCR, so full disclosure, it is my product). Night time is where most of the problems show up, and I would like to hear what other people found works. The things I keep running into: infrared light bouncing off the plate and turning it into a white box motion blur when the camera drops to a slow shutter plates that are only 40 to 60 pixels wide in the stream headlights washing out the picture For people who have…

[Hiring] Founding 3D Engineer at OmaScan (LiDAR, Photogrammetry, Gaussian Splatting on iOS) | Toronto or remote in Canada

Founding 3D Engineer at OmaScan Full time · Toronto (hybrid) or remote in Canada · Contract-to-hire welcome What is OmaScan? OmaScan is a healthtech startup on a mission to help seniors and people with accessibility challenges live longer, safer, more independent lives at home. Before someone gets a ramp, a stairlift or grab bars, an OT or accessibility professional visits their home with a tape measure, a notepad and a lot of photos. With OmaScan, they scan the home in 3D on an iPhone or iPad,…

Multi-camera OpenCV project. camera indices change

On Linux, run ls -l /dev/v4l/by-path/ to map each physical USB port to its camera position. Keep the cameras on those ports and use cv2.VideoCapture(path, cv2.CAP_V4L2) to open the corresponding capture node instead of using an index. Some cameras expose multiple video nodes, so check which one produces frames. If you want clearer names, a udev rule can create a symlink for each port. Verify the mapping after reconnecting before using it for alignment.

Does an app already exist that can automatically sort graduation photos by person?

I don’t know one tool that does exactly this, but you can get most of it by combining existing pieces: Face grouping: digiKam, PhotoPrism or Immich can cluster faces and let you name each person. All of them can run locally, and you can export or sort the photos per person afterwards. Diploma names: run OCR on the diploma shots (Tesseract, EasyOCR or PaddleOCR) and match the text against your list of names. Linking a diploma photo to the photos around it: use the EXIF timestamps. A person…

Multi-camera OpenCV project. camera indices change

The index is only the order in which the OS lists the devices, so it will change after a reboot or replug. The fix is to not use the index as the identity. Linux: open the camera by path instead. /dev/v4l/by-path/… is tied to the physical USB port, and /dev/v4l/by-id/… is tied to the camera’s serial. Cheap cameras of the same model often share the same ID, so by-path is usually safer. You can also write udev rules that create fixed names such as /dev/cam_left. Then use cv2.VideoCapture(path,…

Multi-Camera Person Tracking: How to Maintain a Persistent ID Across Non-Overlapping CCTV Cameras?

What you describe is called multi-camera person re-identification (ReID). ByteTrack only keeps IDs inside one camera, so you need a second layer on top of it. For each local track, take a few crops and compute an appearance embedding with a ReID model (OSNet through torchreid, FastReID, or similar). Keep an average or a few embeddings per track. Keep a gallery of “global IDs”. When a track ends in camera 1 or a new track starts in camera 2, compare its embedding to the gallery with cosine…

Multi-View CCTV Pallet Counting: Resolving Interlocking Layer Occlusion via Calibrated Ground Plane & Homography

A few thoughts, mostly on the occlusion part. A single ground-plane homography is only valid for points that really lie on that plane. The top face of a bundle sits at a different height, so it lands in the wrong place on your floor grid. A separate homography per layer height (the plane at Z = each tier) is the cleaner way to merge the two views: warp each camera’s masks onto the same layer plane, then combine them there. I would treat it as occupancy, not box fitting. Per layer, mark which…

Bird-safe gap check: measuring gaps in bird-safe window markings with OpenCV 5

Thanks, this is very helpful. I do agree that the 0.41 blob is due to a merge. I wouldn’t lower the 0.80 cutoff, since that would let reflections in: actual dots had a roundness of 0.88 or higher, while reflection blobs had 0.74 or less. I also think it would be useful to save the masks and contours from the missed crop and a found dot, and then try varying kernel size and threshold. Until the dot can be separated cleanly, the region stays marked as unreadable and asks for a retake.

Introducing PureCV: A Pure Rust Port of OpenCV

One conformance test for the documented intentional angle difference in phase and cart_to_polar is to use vectors immediately on either side of the positive x-axis and in each quadrant, then check the output range, wraparound, and magnitude against OpenCV 4.10.0. Compare angles with a tolerance rather than bit equality: the audit says PureCV uses atan2 while OpenCV uses fastAtan2. Running the same fixtures with and without SIMD could also catch feature-dependent boundary behavior without…

Get Video Data Post-Compression Pre-Writing

For a concrete packet boundary, FFmpeg’s encode_video.c example sends an AVFrame with avcodec_send_frame(), then calls avcodec_receive_packet() in a loop until EAGAIN or EOF. Each returned AVPacket exposes data and size before the example writes those bytes and calls av_packet_unref(). At that point, your application can inspect or copy the compressed bytes rather than pass a frame to VideoWriter::write() and let the backend own the output path. The example writes an elementary stream, not a…

Bird-safe gap check: measuring gaps in bird-safe window markings with OpenCV 5

The README’s merged dot/reflection example (roundness 0.41) suggests checking where the candidate first connects to the reflection before changing the 0.80 cutoff. For the missed top-row crop and a correctly detected dot, save the rectified grayscale image, top-hat and black-hat responses, threshold masks, and contours before filtering. Overlay each contour and log its area, perimeter, and roundness. OpenCV defines black-hat as closing minus the input, so kernel size and the local background…

Scientific Imaging and Machine Learning Workshop

Came across this workshop in my feed. Thought maybe interesting to many CV folks here. And it is in Puerto Rico! Deadline in 2 days though. Reminder: Deadline to apply to the Scientific Imaging and Machine Learning Workshop ( Scientific Imaging and Machine Learning Workshop | DSI ) is this Friday Oct 30, 2026! The 4-day workshop will take place in San Juan, Puerto Rico, March 15 - 18, 2027. The workshop will cover hotel accommodation. Limited travel scholarships are available. Application…