# \#imgproc

**URL:** https://forum.opencv.org/tag/imgproc/235.md

[Latest](https://forum.opencv.org/latest.md) · [Categories](https://forum.opencv.org/categories.md) · [Tags](https://forum.opencv.org/tags.md)

---

## [Why is the operation \`S0 \>\> 4\` performed when the \`resize\` function takes \`u8\` input and a scalar for the V-direction? Since \`int32\` would not overflow in the scalar case, why is this operation still necessary?](https://forum.opencv.org/t/why-is-the-operation-s0-4-performed-when-the-resize-function-takes-u8-input-and-a-scalar-for-the-v-direction-since-int32-would-not-overflow-in-the-scalar-case-why-is-this-operation-still-necessary/24714)

<div class="topic-metadata">

**Author:** [@penghuihe](https://forum.opencv.org/u/penghuihe)\
**Replies:** 4\
**Last updated:** [September 25, 2026, 7:57am UTC](https://forum.opencv.org/t/why-is-the-operation-s0-4-performed-when-the-resize-function-takes-u8-input-and-a-scalar-for-the-v-direction-since-int32-would-not-overflow-in-the-scalar-case-why-is-this-operation-still-necessary/24714 "2026-09-25T07:57:54Z")

</div>

template\<\> struct VResizeLinear\<uchar, int, short, FixedPtCast\<int, uchar, INTER\_RESIZE\_COEF\_BITS\*2\>, VResizeLinearVec\_32s8u\> { typedef uchar value\_type; typedef int buf\_type; typedef short alpha\_type; void operato…

---

## [How can I do this? C# OpenCV](https://forum.opencv.org/t/how-can-i-do-this-c-opencv/24684)

<div class="topic-metadata">

**Author:** [@Hasan\_Bas](https://forum.opencv.org/u/Hasan_Bas)\
**Replies:** 0\
**Last updated:** [August 13, 2026, 8:54pm UTC](https://forum.opencv.org/t/how-can-i-do-this-c-opencv/24684 "2026-08-13T20:54:02Z")

</div>

I am trying to detect the 56 filaments seen in some threads in this microscope cross-sectional image using OpenCV. However, it sometimes falsely counts round, bright spots on the glass coverslip where the thread is laid. …

---

## [Matchtemplate SQDIFF has minValue != 0 for identical image/template](https://forum.opencv.org/t/matchtemplate-sqdiff-has-minvalue-0-for-identical-image-template/24518)

<div class="topic-metadata">

**Author:** [@kinram](https://forum.opencv.org/u/kinram)\
**Replies:** 4\
**Last updated:** [May 29, 2026, 4:14pm UTC](https://forum.opencv.org/t/matchtemplate-sqdiff-has-minvalue-0-for-identical-image-template/24518 "2026-05-29T16:14:04Z")

</div>

Based on the SQDIFF formula: OpenCV: Object Detection I expected to get a minValue of 0 when the template and the image are identical, because the square difference is 0 for each pixel in each channel, so the sum must b…

---

## [\[Help\] Struggling to detect pool pockets and place these pockets in live video](https://forum.opencv.org/t/help-struggling-to-detect-pool-pockets-and-place-these-pockets-in-live-video/24487)

<div class="topic-metadata">

**Author:** [@Acookook](https://forum.opencv.org/u/Acookook)\
**Replies:** 5\
**Last updated:** [May 5, 2026, 6:33pm UTC](https://forum.opencv.org/t/help-struggling-to-detect-pool-pockets-and-place-these-pockets-in-live-video/24487 "2026-05-05T18:33:13Z")

</div>

I am working on a master’s thesis project -an augmented-reality training system for eight-ball pool. The goal is to detect the real pool-table state from an overhead phone camera, map balls and pockets into table-plane c…

---

## [2 serious bugs (Mat scaling and VideoCapture::set) still active?](https://forum.opencv.org/t/2-serious-bugs-mat-scaling-and-videocapture-set-still-active/24417)

<div class="topic-metadata">

**Author:** [@nji9](https://forum.opencv.org/u/nji9)\
**Replies:** 0\
**Last updated:** [April 8, 2026, 8:54am UTC](https://forum.opencv.org/t/2-serious-bugs-mat-scaling-and-videocapture-set-still-active/24417 "2026-04-08T08:54:53Z")

</div>

I realized that 2 issues I issued to OpenCV that seem important to me don’t seem to be taken into account since years: VideoCapure::set isn’t relyable/ sets to wrong frame sometimes VideoCapture::set (CAP\_PROP\_POS\_FRAM…

---

## [Recommended OpenCV version, CMake flags, or pre-built binaries for CUDA 13.2 & cuDNN 9.2](https://forum.opencv.org/t/recommended-opencv-version-cmake-flags-or-pre-built-binaries-for-cuda-13-2-cudnn-9-2/24407)

<div class="topic-metadata">

**Author:** [@emanuele](https://forum.opencv.org/u/emanuele)\
**Replies:** 1\
**Last updated:** [March 27, 2026, 3:52pm UTC](https://forum.opencv.org/t/recommended-opencv-version-cmake-flags-or-pre-built-binaries-for-cuda-13-2-cudnn-9-2/24407 "2026-03-27T15:52:36Z")

</div>

I am planning to use OpenCV with CUDA support and I would like some advice on version compatibility, the build process, or alternative solutions. My current environment setup is: CUDA Toolkit: 13.2 (correctly install…

---

## [Loader don't find an imageproc function](https://forum.opencv.org/t/loader-dont-find-an-imageproc-function/24378)

<div class="topic-metadata">

**Author:** [@Etruscus](https://forum.opencv.org/u/Etruscus)\
**Replies:** 1\
**Last updated:** [March 9, 2026, 2:40pm UTC](https://forum.opencv.org/t/loader-dont-find-an-imageproc-function/24378 "2026-03-09T14:40:12Z")

</div>

GCC at compile time give me this messageundefined reference tocv::GaussianBlur(cv::\_InputArray const&, cv::OutputArray const&, cv::Size, double, double, int)’ with this code cv::Mat CreateLinearMotionKernel(double Angl…

---

## [Error rotated error indexing](https://forum.opencv.org/t/error-rotated-error-indexing/24351)

<div class="topic-metadata">

**Author:** [@osmironov](https://forum.opencv.org/u/osmironov)\
**Replies:** 1\
**Last updated:** [February 3, 2026, 4:35pm UTC](https://forum.opencv.org/t/error-rotated-error-indexing/24351 "2026-02-03T16:35:06Z")

</div>

Say I have a grayscale image 2 pixels width 3 pixels height. And I want to rotate it on some angle. For example, I will rotate it on 90 degrees. I will use the matrices for the forward and backward transformations like t…

---

## [matchTemplate and old games graphics](https://forum.opencv.org/t/matchtemplate-and-old-games-graphics/3486)

<div class="topic-metadata">

**Author:** [@veilleur](https://forum.opencv.org/u/veilleur)\
**Replies:** 12\
**Last updated:** [January 24, 2026, 11:44am UTC](https://forum.opencv.org/t/matchtemplate-and-old-games-graphics/3486 "2026-01-24T11:44:44Z")

</div>

hi all, #elementachercher = path to template png file #screenascanner = path to global picture where to find template import pyautogui import time import cv2 import numpy as np from matplotlib import pyplot as plt imp…

---

## [Can not get through with this problem, can someone help?](https://forum.opencv.org/t/can-not-get-through-with-this-problem-can-someone-help/24294)

<div class="topic-metadata">

**Author:** [@Phan\_Hung\_Linh](https://forum.opencv.org/u/Phan_Hung_Linh)\
**Replies:** 1\
**Last updated:** [January 4, 2026, 9:03pm UTC](https://forum.opencv.org/t/can-not-get-through-with-this-problem-can-someone-help/24294 "2026-01-04T21:03:02Z")

</div>

Propose some SEs (structure element) to extract the sticks and the circles (2 situation) then write a python program using morphological transformations (from openCV). The final result should be an image with only one…

---

## [Is there a way to use superimposed in opencv library?](https://forum.opencv.org/t/is-there-a-way-to-use-superimposed-in-opencv-library/24286)

<div class="topic-metadata">

**Author:** [@fkuslu](https://forum.opencv.org/u/fkuslu)\
**Replies:** 1\
**Last updated:** [December 30, 2025, 7:23pm UTC](https://forum.opencv.org/t/is-there-a-way-to-use-superimposed-in-opencv-library/24286 "2025-12-30T19:23:41Z")

</div>

Hi, I am building a project where i need to superimpose certain objects on a x-ray luggage image. I came across pyxvis library but I am wondering if there any method like this in opencv? The method I need to use is “Su…

---

## [Iterative Phase Correlation PR](https://forum.opencv.org/t/iterative-phase-correlation-pr/24234)

<div class="topic-metadata">

**Author:** [@zdenyhraz](https://forum.opencv.org/u/zdenyhraz)\
**Replies:** 1\
**Last updated:** [December 1, 2025, 4:37pm UTC](https://forum.opencv.org/t/iterative-phase-correlation-pr/24234 "2025-12-01T16:37:57Z")

</div>

OpenCV already has cv::phaseCorrelate function to find the shift between two images. I am the author of the Iterative Phase Correlation algorithm, which is an extension to this algorithm, that significantly improves sub…

---

## [Help with the method of expanding black and white background text](https://forum.opencv.org/t/help-with-the-method-of-expanding-black-and-white-background-text/24212)

<div class="topic-metadata">

**Author:** [@cxnet](https://forum.opencv.org/u/cxnet)\
**Replies:** 2\
**Last updated:** [November 17, 2025, 8:21am UTC](https://forum.opencv.org/t/help-with-the-method-of-expanding-black-and-white-background-text/24212 "2025-11-17T08:21:01Z")

</div>

Hello everyone, I’m going to perform an expansion process on an image with black text on a white background and white text on a black background. However, if I use the traditional dilate function to expand it by 2 pixels…

---

## [Canny cannot detect valid edges against similar backgrounds](https://forum.opencv.org/t/canny-cannot-detect-valid-edges-against-similar-backgrounds/24180)

<div class="topic-metadata">

**Author:** [@JIN\_PRO](https://forum.opencv.org/u/JIN_PRO)\
**Replies:** 1\
**Last updated:** [November 3, 2025, 10:49am UTC](https://forum.opencv.org/t/canny-cannot-detect-valid-edges-against-similar-backgrounds/24180 "2025-11-03T10:49:06Z")

</div>

Hi everyone, I’m trying to detect the edges of planar objects on a chessboard. The background and objects have some similar colors, and it seems that Canny and thresholding methods aren’t working for me. Are there any be…

---

## [CANN RESIZE function supports](https://forum.opencv.org/t/cann-resize-function-supports/24170)

<div class="topic-metadata">

**Author:** [@zr\_l](https://forum.opencv.org/u/zr_l)\
**Replies:** 1\
**Last updated:** [October 29, 2025, 9:57am UTC](https://forum.opencv.org/t/cann-resize-function-supports/24170 "2025-10-29T09:57:30Z")

</div>

Hello, I would like to ask about OpenCV’s support for the CANN backend, particularly in image preprocessing, as I need to use many interpolation methods like the resize function. Could you please tell me which version of…

---

## [Barcode recognition doesn't provide satisfying results, DNN seems not to work](https://forum.opencv.org/t/barcode-recognition-doesnt-provide-satisfying-results-dnn-seems-not-to-work/23981)

<div class="topic-metadata">

**Author:** [@julian](https://forum.opencv.org/u/julian)\
**Replies:** 0\
**Last updated:** [September 10, 2025, 3:16pm UTC](https://forum.opencv.org/t/barcode-recognition-doesnt-provide-satisfying-results-dnn-seems-not-to-work/23981 "2025-09-10T15:16:46Z")

</div>

I tested the class for Barcode detection and decoding and whereas the detection of my EAN-13 barcodes worked well, the algorithm failed to decode some of them consecutively. In some cases the corner points are in the wr…

---

## [Thin plate spline warpImage produces only zeros](https://forum.opencv.org/t/thin-plate-spline-warpimage-produces-only-zeros/1125)

<div class="topic-metadata">

**Author:** [@pakoun](https://forum.opencv.org/u/pakoun)\
**Replies:** 14\
**Last updated:** [September 4, 2025, 2:52am UTC](https://forum.opencv.org/t/thin-plate-spline-warpimage-produces-only-zeros/1125 "2025-09-04T02:52:37Z")

</div>

Dear all, I am trying to warp an image using the thinplatespline but after warping, the image contains only 0 values. I am attaching a working code example and the datasets as well. I hope for some help to show me the r…

---

## [Help with "Application of artificial intelligence in scaling graphic patterns" Project](https://forum.opencv.org/t/help-with-application-of-artificial-intelligence-in-scaling-graphic-patterns-project/23899)

<div class="topic-metadata">

**Author:** [@Mateusz\_PL](https://forum.opencv.org/u/Mateusz_PL)\
**Replies:** 0\
**Last updated:** [August 25, 2025, 1:28pm UTC](https://forum.opencv.org/t/help-with-application-of-artificial-intelligence-in-scaling-graphic-patterns-project/23899 "2025-08-25T13:28:35Z")

</div>

Hi! I’m looking for some help/tutoring (I hope it’s not against the rules). I’m working on a project that involves recognizing patterns and generating new images with the same patterns but different sizes. I’d really app…

---

## [Finding the Corner points from the mask image](https://forum.opencv.org/t/finding-the-corner-points-from-the-mask-image/23037)

<div class="topic-metadata">

**Author:** [@Kunal\_Kewat](https://forum.opencv.org/u/Kunal_Kewat)\
**Replies:** 0\
**Last updated:** [July 10, 2025, 11:55am UTC](https://forum.opencv.org/t/finding-the-corner-points-from-the-mask-image/23037 "2025-07-10T11:55:02Z")

</div>

I want to find the marked point in the image from this polygon region. I have fitted a ellipse and done import cv2 import numpy as np # Load the binary mask image # Make sure 'image\_2fd641.png' is in the same direct…

---

## [Determining frequency of repetitive mouvements in live video feed](https://forum.opencv.org/t/determining-frequency-of-repetitive-mouvements-in-live-video-feed/22812)

<div class="topic-metadata">

**Author:** [@Freddy](https://forum.opencv.org/u/Freddy)\
**Replies:** 2\
**Last updated:** [June 30, 2025, 6:40pm UTC](https://forum.opencv.org/t/determining-frequency-of-repetitive-mouvements-in-live-video-feed/22812 "2025-06-30T18:40:05Z")

</div>

I want to analyse live video feed of people doing repetitive motion. Specifically the will be a phone in a tripod looking at people doing indoor paddling. I want to determine the stroke rate. The frame below is an exa…

---

## [Photonic Chip Image Recognition](https://forum.opencv.org/t/photonic-chip-image-recognition/22540)

<div class="topic-metadata">

**Author:** [@R.W.V](https://forum.opencv.org/u/R.W.V)\
**Replies:** 6\
**Last updated:** [June 23, 2025, 8:55pm UTC](https://forum.opencv.org/t/photonic-chip-image-recognition/22540 "2025-06-23T20:55:30Z")

</div>

I have photos of these photonic chips (top left) for which I need to create and overlay highlighting its shape. I dont get the full chip in the image, only a corner. I have tried using Canny and HoughlinesP to recognize …

---

## [Find Chessboard Corners Function Help](https://forum.opencv.org/t/find-chessboard-corners-function-help/22535)

<div class="topic-metadata">

**Author:** [@russelte](https://forum.opencv.org/u/russelte)\
**Replies:** 0\
**Last updated:** [June 18, 2025, 6:07pm UTC](https://forum.opencv.org/t/find-chessboard-corners-function-help/22535 "2025-06-18T18:07:51Z")

</div>

Hello guys, I am trying to create a calibration script for a project I am in. Here is the general idea, I will have a reference image with the camera in the correct location. I will find the chessboard corners and save i…

---

## [initUndistortRectifyMap does not return same undistorted image as manual undistortion](https://forum.opencv.org/t/initundistortrectifymap-does-not-return-same-undistorted-image-as-manual-undistortion/21117)

<div class="topic-metadata">

**Author:** [@zeellos](https://forum.opencv.org/u/zeellos)\
**Replies:** 3\
**Last updated:** [May 31, 2025, 6:10am UTC](https://forum.opencv.org/t/initundistortrectifymap-does-not-return-same-undistorted-image-as-manual-undistortion/21117 "2025-05-31T06:10:04Z")

</div>

I have been trying to replicate what initUndistortRectifyMap does for my application. For some reason, when I do manual undistortion, I get different result than using initUndistortRectifyMap. I feel I am following the …

---

## [Question of Telea Inpaint Source Code](https://forum.opencv.org/t/question-of-telea-inpaint-source-code/20902)

<div class="topic-metadata">

**Author:** [@Leo1212](https://forum.opencv.org/u/Leo1212)\
**Replies:** 0\
**Last updated:** [April 27, 2025, 9:26am UTC](https://forum.opencv.org/t/question-of-telea-inpaint-source-code/20902 "2025-04-27T09:26:14Z")

</div>

I’m reading the source code of Telea Inpaint method. The grandiant calculate code makes me confused. /modules/photo/src/inpaint.cpp #319 if (CV\_MAT\_ELEM(\*f,uchar,k,l+1)!=INSIDE) { if (CV\_MAT\_ELEM(\*f,uchar,k,l-1)!=I…

---

## [Recognizing a grid of letters from a phone display](https://forum.opencv.org/t/recognizing-a-grid-of-letters-from-a-phone-display/20821)

<div class="topic-metadata">

**Author:** [@Ralf\_71](https://forum.opencv.org/u/Ralf_71)\
**Replies:** 2\
**Last updated:** [April 16, 2025, 9:41am UTC](https://forum.opencv.org/t/recognizing-a-grid-of-letters-from-a-phone-display/20821 "2025-04-16T09:41:35Z")

</div>

Hello everybody! I want to build myself a program to solve a HASHTAG riddle. It is like the Wordle game, or mastermind, wrapped into one - and then you solve four of them in a grid together. This is what it looks like: …

---

## [How to use opacity in drawKeypoints or drawMatches?](https://forum.opencv.org/t/how-to-use-opacity-in-drawkeypoints-or-drawmatches/20792)

<div class="topic-metadata">

**Author:** [@dustinfreeman](https://forum.opencv.org/u/dustinfreeman)\
**Replies:** 1\
**Last updated:** [April 10, 2025, 8:51pm UTC](https://forum.opencv.org/t/how-to-use-opacity-in-drawkeypoints-or-drawmatches/20792 "2025-04-10T20:51:08Z")

</div>

I’m using OpenCV 4.10 in python, but this should generalize to anyone using drawKeypoints or drawMatches. I want to draw the keypoints with less than 100% opacity over the image. I have tried: img3 = cv2.drawKeypoints(i…

---

## [Detecting and identifying rectangular gums](https://forum.opencv.org/t/detecting-and-identifying-rectangular-gums/20723)

<div class="topic-metadata">

**Author:** [@Aditya09](https://forum.opencv.org/u/Aditya09)\
**Replies:** 10\
**Last updated:** [April 3, 2025, 4:32pm UTC](https://forum.opencv.org/t/detecting-and-identifying-rectangular-gums/20723 "2025-04-03T16:32:57Z")

</div>

I Need help with detecting and identifying rectangular gums in images using a rule-based image processing approach and overlaying detected gums with green and red rectangles based on shape.

---

## [Finding and correcting a warped table (as a preprocessing step to isolate each cell)](https://forum.opencv.org/t/finding-and-correcting-a-warped-table-as-a-preprocessing-step-to-isolate-each-cell/20714)

<div class="topic-metadata">

**Author:** [@danelyn](https://forum.opencv.org/u/danelyn)\
**Replies:** 0\
**Last updated:** [April 2, 2025, 2:27am UTC](https://forum.opencv.org/t/finding-and-correcting-a-warped-table-as-a-preprocessing-step-to-isolate-each-cell/20714 "2025-04-02T02:27:55Z")

</div>

hi y’all! I’m a complete newbie to image processing, and I’ve found myself trying to process an image of a table, printed on a sheet of paper. in my use case, this sheet of paper can be warped a decent amount, because of…

---

## [Pac-man Effect when using warpPerspective](https://forum.opencv.org/t/pac-man-effect-when-using-warpperspective/17116)

<div class="topic-metadata">

**Author:** [@HeadTriXz](https://forum.opencv.org/u/HeadTriXz)\
**Replies:** 29\
**Last updated:** [March 16, 2025, 8:24am UTC](https://forum.opencv.org/t/pac-man-effect-when-using-warpperspective/17116 "2025-03-16T08:24:34Z")

</div>

Hello! I’m using a ChArUco board to calibrate three cameras. The input of the cameras will be used to create a stitched top-down view. So far, everything seems to work fine, except for one part: the perspective warping. …

---

## [How can I determine the color uniformity in an image?](https://forum.opencv.org/t/how-can-i-determine-the-color-uniformity-in-an-image/20524)

<div class="topic-metadata">

**Author:** [@joseph\_trigos11](https://forum.opencv.org/u/joseph_trigos11)\
**Replies:** 1\
**Last updated:** [March 14, 2025, 8:02pm UTC](https://forum.opencv.org/t/how-can-i-determine-the-color-uniformity-in-an-image/20524 "2025-03-14T20:02:32Z")

</div>

I’m trying to determine how uniform the color is across the top of a mandarin (the mandarin is already segmented). I’m working with the CIELAB color space. I tried a statistical analysis using standard deviation, so the …

[Next page](https://forum.opencv.org/tag/imgproc/235.md?match_all_tags=true&page=1&tags%5B%5D=imgproc)
