Category "image-processing"

transforming img to gray error, tuple out of range

I am using this function that I found on the web, its add_speckle() function for adding speckle noise to images : def add_speckle(k,theta,img): gauss = np.

Use cv2.findContours output as plt.contour input

I have the following image I find the contour using contours, hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE) contour = contours[0]

2D Ball Stabilization Platform

I am trying to do 2D ball stabilization platform which always keeps the ball which is put on the platform, center of the platform (x= 0, y=0). Here is my restri

Use OpenCV to identiy hollow and filled circles

I'm using OpenCV houghcircles to identify all the circles (both hollow and filled). Follow is my code: import numpy as np import cv2 img = cv2.imread('images/3

Python/Opencv save multiple images to folder with different names

I am working on image processing, I have a folder with all of the images that needs to be processed, and I want to save all the processed images to another fold

Why the injected wavenumber can't match with the 2-D plot?

I want to inject a 2D travelling wave into a sensor system for seismic data analysis. To do this, I inject a 2D sine wave of known parameters (wave numbers (lam

Difference between the return values of tensorflow.keras.preprocessing.img_to_array and tf.image.decode_jpeg

I have a task to load and extract feature embeddings from images. I've working solutions that utilize two different ways of loading the image: tensorflow.keras.

How to repair the corrupted image below using opencv, python, numpy and necessary libraries

import cv2 damaged_image = cv2.imread("Corrupted.png") mask = cv2.imread("mask.png", 0) output = cv2.inpaint(damaged_image, mask, 1, cv2.INPAINT_TELEA) cv2.i

opencv 3.1.0 imread stunked, but imdecode is ok

I'm using opencv 3.1.0, tried to read an image by imread, just like Mat image = cv::imread("1.jpg"); but it stunked without any error message (performs like in

Trying to get output of each layer while predicting test image, however getting an error Input tensors to a Functional must come from `tf.keras.Input`

I am trying to do Image Recognition in Python with TensorFlow and Keras. Please look at my code in the link below which I provided as I was facing another issue

How to capture Open3d screen without saving

I want to use the open3d image screen right away without saving it as a file. However, the 'capture_screen_image' function provided by open3d must save the imag

How can I retain background after dilating text in image

import cv2 import numpy as np # Load image, grayscale, Gaussian blur, Otsu's threshold image = cv2.imread('1.png') gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRA

Fitting a contour inside another contour using OpenCV

The idea is to have a rectangular contour, searching for the points of intersection with the triangle one (as shown in the image below) and then move the recta

Differentiate apple stem, calyx and defect

I am trying to differentiate apple stem calyx and defects. I have developed a detector that detects these parts on apple. But so far everything that i have trie

Quantify longest axis and width of irregular shapes within a single image

Original question I have about 80-100 images such as (A). Each image is composed of shapes that were filled with black color after marking the outline in ImageJ

Image masking by coordinate or changing binary image pixel to black based on the the coordinate

I have this binary image and i want to remove the objects (convert all the white pixel to black ) that are above the (x, y) coordinate. This is the inital binar

How many dimensions is a RGB image?

I first thought it would be 3 dimensions (one for R, one for G, one for B). However what about the width and height? More a physics/image processing question I

Python Remap function returns not an image

I have a problem with the code. There is no compile error, but the result does not give a corrected image. Could someone please explain me where is my error. I

inner holes in segmentation polygons -coco dataset

So to explain the problem I have a dataset with the coco format I want to reconstruct the binary mask from the segmentation information stored in the annotation

Scanned image noise removal and text strengthening/enhancing

I want to remove noise from scanned image pdf and enhance it. I have tried lots of technique but did not get success yet. Please help on this. Thanks in advance