All Questions
447 questions
0
votes
2
answers
118
views
trying to remove this faint watermark - but end up getting a blue tint in matplotlib display
I am working on a project that requires removing a specific type of watermark from the background of certain pictures (typically STEM-related, as this is for an educational project). To begin, I ...
0
votes
1
answer
70
views
Channels of the image before and after conversion have not changed
I use OpenCV to read an RGB image and going to print it by matplotlib. So, I use the cvtColor to transfer the BGR(As I know, the imread ofen reads BGR channels) to RGB. But after print, i checked the ...
0
votes
0
answers
122
views
Filtering and ellipse fitting noisy images
I have images as shown below (Figure 1) and I would like to fit two ellipses to the inner and outer shapes.
Raw data:
Edit
New code with fmw42's suggestions
if img is None:
print("Failed to ...
0
votes
0
answers
44
views
Does the Intensity of color in OpenCV image matter?
Here is a simple code which puts a text value onto a black frame and displays it:
frame = np.zeros((50,200,3))
org=(0,45)
font=cv2.FONT_HERSHEY_SIMPLEX
fontScale=1
fontColor=(1,0,0) ##rgb
out_img =...
0
votes
1
answer
66
views
How to find coordinates of selected objects OpenCV?
In general, I highlighted these objects in red using OpenCV, but I don’t know how to find their coordinates:
Initially it all looked like this:
import cv2
import matplotlib.pyplot as plt
img = cv2....
1
vote
2
answers
214
views
How to save the Fourier transform of an image such that I can modify it in an image editor?
I have a noisy image with a particular pattern and I want to remove the pattern. I save the FFT magnitude to a tiff image and the phases to a np.array text file.
I have this python code that computes ...
0
votes
1
answer
47
views
Displaying different gray scale images with actual size in matplotlib subplot
I use following function to display different images with its actual size in matplotlib subplot.
I go this function from this reference: https://stackoverflow.com/a/53816322/22241489
def display_image(...
2
votes
0
answers
136
views
Overlay matplotlib plot with transparent background on to image
I try to overlay a matplot plot on to a specific place of an image with opencv. The problem is that the overlay always has a black or white background, and when I overlay it on a background image, the ...
1
vote
1
answer
4k
views
How to convert a matplotlib figure to a cv2 image?
I would like to know how convert a matplotlib figure to a cv2 image, this is my python3 code:
import cv2
import matplotlib.pyplot as plt
# Generating matplotlib figure and save it as a png image
...
0
votes
0
answers
173
views
Why is the corners returned from cv2.aruco.detectMarkers method smaller than the truth value?
I'm using an 800 * 800 pure black and white ideal marker image as the input. The marker is placed at the center of the image, the size is 500 * 500. So the truth value of the corners' coordinates ...
2
votes
1
answer
543
views
Issue with Hierarchical Lucas-Kanade method on Optical Flow
Issue with Hierarchical Lucas-Kanade method on optical flow
I am implementing the hierarchical Lucas-Kanade method in Python based on
this tutorial. However, when
applying the method to a rotating ...
-1
votes
1
answer
249
views
Gradients and Laplacian of an image using skimage vs. open-cv
I compare the vertical and horizontal gradients and Laplacian of an image using skimage and cv2 with the following code:
import sys
import matplotlib.pyplot as plt
from matplotlib.image import imread
...
-3
votes
1
answer
104
views
Trouble Converting Color Image to Grayscale Using OpenCV [duplicate]
I'm trying to convert a color image to grayscale(black and white) using OpenCV in Python, but I'm encountering an issue where the output is not as expected. Here's the code I'm using:
import cv2
from ...
-2
votes
1
answer
82
views
matplotlib shows my image but cv2.imwrite() just saves blackness
After converting the original *.jpg file, using the "reference white color" method (the idea is from here)
def whitepatch_balancing(image, from_row, from_column, row_width, column_width):
...
0
votes
1
answer
198
views
calculate the RMS intensity image with opencv
I would like to calculate the intensity of I(x,y)/Io(x,y).
First, I read my images using rawpy because I have .nef files (Nikon raw).
Then I use opencv to transform my images into grayscale and I ...