Category "image-processing"

input_image_meta shape error while using pixellib custom trainig on images

I am using pixellib fot training custom image instance segmentation. I have created a dataset whiche can be seen below in link. Dataset:https://drive.google.com

SLIC Superpixel number of superpixels is smaller than the requested

When using the SLIC Superpixel segmentation, sometimes the resulting number of Superpixels is smaller than the requested, is this because of enforced connectivi

Understanding contour hierarchies: How to distinguish filled circle/contour and unfilled circle/contour in OpenCV?

I am unable to differentiate between the below two contours. cv2.contourArea() is giving the same value for both. Is there any function to distinguish them in P

Changing color within a specific area with opencv using c++

I would like to know if there's a simple way to change a color, say from a shade of grey to white, within an area of interest that would be determined from the

QR Code Detection from Pyzbar with Camera Image

I am having trouble detecting QR code using Pyzbar. Under perfection condition, I am able to detect the QR code using the original png image. However, when I do

How to recalculate the coordinates of a point after scaling and rotation?

I have the coordinates of 6 points in an image (170.01954650878906, 216.98866271972656) (201.3812255859375, 109.42137145996094) (115.70114135742188, 210.427291

Estimating distance from camera to ground plane point

How can I calculate distance from camera to a point on a ground plane from an image? I have the intrinsic parameters of the camera and the position (height, p

How to detect corners of a square with Python OpenCV?

In the image below, I am using OpenCV harris corner detector to detect only the corners for the squares (and the smaller squares within the outer squares). Howe

Java Image orientation transfers from Landscape to Portrait ImageIO.read()

when the image is loaded from localdrive by default my image rotates to Portrait from Landscape. My image type is ".jpg" and size is 1.32MB. To verify the issue

How to prune some unnecessary branches from the Voronoi diagram?

I generated the Voronoi diagram using the following MATLAB code. The problem is that in the output image I obtain some useless lines that I want to remove. By u

divide image into two equal parts python opencv

can someone tell me how to implement a bisection of the image into upper and lower part? so that I could overlap them. for example, I have an image and I should

How to crop face detected via Mediapipe in Python

i have a problem with mediapipe coordinations. What i want to do is crop the box of the detected face. https://google.github.io/mediapipe/solutions/face_detecti

Run time error assigning cv::Mat element value using cv::Mat::at

In the following code I would like to assign a values to elements of a Mat variable in a loop. I get the runtime error below. pair<Mat, Mat> meshgrid(vect

How to use cv::decode (access image) correct?

I need help with the following problem: Task script: read in the message sensor_msgs/PointCloud2, display Bird Eye View image and save (png or jpg). Desired new

Extract misclassified images using CNN keras

I am having difficulties extracting misclassified images, I tried to use the following line of code: inc= np.nonzero(model.predict_classes(test_data).reshape(-

how to modify resnet 50 with 4 channels as input using pre-trained weights in Pytorch?

I would like to change the resnet50 so that I can switch to 4 channel input, use the same weights for the rgb channels and initialize the last channel with a no

Create Random Pixel Images in Swift

I want to create a random pixel generator in swift. How would I be able to create something like the below codes in swift? Java program to demonstrate creatio

When applying Gaussian filter the image becomes dark

When I run the following code the output result is blurred but the image gets darker as I increase the value of sigma. Imports import numpy as np import cv2 i

How is the smooth dice loss differentiable?

I am training a U-Net in keras by minimizing the dice_loss function that is popularly used for this problem: adapted from here and here def dsc(y_true, y_pred)

How to convert NumPy array into OpenCV (cv2) image

I have attached the image of the code here for better understanding, this would help you figure out what I am actually doingI am working on a project in which I