computer-vision

How to convert the OpenCV GetPerpectiveTransform Matrix into a CSS Matrix?

How to convert the OpenCV GetPerpectiveTransform Matrix into a CSS Matrix? Question: I have a matrix from the Python Open-CV library: M = cv2.getPerspectiveTransform(source_points, points) But it is completely different from the CSS Transform Matrix Even though it has the same shape I think open-cv does some kind of other translations to x and y …

Total answers: 1

How to apply Connected Component Analysis left to right order in openCV

How to apply Connected Component Analysis left to right order in openCV Question: i am using connected component analysis to recognize characters from the image. for that i am using cv2.connectedComponentsWithStats() function. As the output it is getting the characters but without a order. num_labels, labels, stats, centroids = cv2.connectedComponentsWithStats(img, 8, cv2.CV_32S) after getting the …

Total answers: 1

Inadequate transform produced by good homographic feature match

Inadequate transform produced by good homographic feature match Question: I’m trying to determine a method to rotate and translate a scanned 2D image to match it’s near-identical but lower-quality digital template. After running the code, I want the images to very closely align when overlaid, so that post-processing effects can be applied to the scan …

Total answers: 1

python opencv – filter controus by position

python opencv – filter contours by position Question: I use this code to find some blobs, and pick the biggest one. contours, hierarchy = cv2.findContours(th1, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) if len(contours) != 0: c = max(contours, key=cv2.contourArea) Now, I would need to change this code in a way so it returns the contour that is in the …

Total answers: 2

How to compute Topk IoU in semantic segmentation using PyTorch?

How to compute Topk IoU in semantic segmentation using PyTorch? Question: Given outputs of a neural network outputs and a ground-truth label. outputs.shape = (N, C, H, W) and label.shape = (N, H ,W), where N is the batch size, C is the number of classes, H and W are crop sizes. Each element of …

Total answers: 1

Detect (and maybe decode) PDF417 barcodes using python

Detect (and maybe decode) PDF417 barcodes using python Question: I am trying to detect the pdf417 barcode (2D barcode) from an image using python. I will be receiving images of IDs where there is a barcode in them but it might not always be straight. So I am looking for an effective way to DETECT …

Total answers: 1

What does it really mean real time object detection?

What does it really mean real time object detection? Question: So here is the context. I created an script in python, YOLOv4, OpenCV, CUDA and CUDNN, for object detection and object tracking to count the objects in a video. I intend to use it in real time, but what real time really means? The video …

Total answers: 2

Error When Trying to Calculate FLOPS for Complex TF2 Keras Models

Error When Trying to Calculate FLOPS for Complex TF2 Keras Models Question: I want to calculate the FLOPS in the ML models used. I get an error when I tried to calculate for much complex models. I get this Error for Efficientnet Models: ValueError: Unknown layer: FixedDropout. Please ensure this object is passed to the …

Total answers: 1

Snake Algorithm (active contour) in python

Snake Algorithm (active contour) in python Question: Find contour on the right side of the chest image as indicated with red circle and by using Python and scikit-image package for the image below this is the image i have to process to make it like this result: the result must be like this Asked By: …

Total answers: 1