Related
Rahul: If I have polar coordinates of a line, how can I draw it on an image in OpenCV and python? LineThe function takes 2 points, but only draws line segments. I want to draw a line from one edge of an image to the other. Robert Caspary: Just count 2 points.
Rahul: If I have polar coordinates of a line, how can I draw it on an image in OpenCV and python? LineThe function takes 2 points, but only draws line segments. I want to draw a line from one edge of an image to the other. Robert Caspary: Just count 2 points.
Mr Programmer As i process the image(BEFORE) then i need its outer border and draw red line in openCV android (like AFTER image), If anyone knows about it, please let me know about advanced tanks. Costantino Grana This is a classic application of cv::findConto
Mr Programmer As i process the image(BEFORE) then i need its outer border and draw red line in openCV android (like AFTER image), If anyone knows about it, please let me know about advanced tanks. Costantino Grana This is a classic application of cv::findConto
user 300058 I'm having a problem with this: I can't draw a line on an image with a certain color, nor can I find out the distance to the place. Help make it look like the image below: my code: import cv2
import numpy as np
from PIL import ImageGrab
whil
Trojan War I am trying to draw perfect lines using mouse events by clicking and dragging the mouse. The problem is that multiple lines are printed when plotting. Here is the code I've been testing. import cv2
import numpy as np
drawing = False
x1,y1 = -1,-1
Open V I have a set of tuples: a = [(375, 193)
(364, 113)
(277, 20)
(271, 16)
(52, 106)
(133, 266)
(289, 296)
(372, 282)]
How to draw lines between points in OpenCV? Here is my code that doesn't work: for index, item in enumerate(a):
print (item[index])
McMad I am using OpenCV camera preview. I want to draw a rectangle on live preview. I've tried to override the ondraw method but I can't see a line. please help. package com.example.easymeasure;
import org.opencv.android.JavaCameraView;
import android.conten
Retric Here is what I get: draw.line([(x1,y1),(x2,y2)],fill = (255, 255, 255))
The result is a white line, but I want a transparent line, what should I do? Kay Patel As far as I know, the line function takes RGB or RGBA values. try: draw.line([(x1,y1),(x2,y2)
smoked The program reads the image located at C:/Square.png and draws lines on it. Also defines the plot title. I want to display the whole image in a tkinter window. what should I do? Here is the image. The name has to be changed and we can run the code. http
KhoaLearnToCode I'm having a problem here when trying to draw multiple lines on an image. So, here is my code: fig=plt.figure()
final = cv2.imread('frame9.jpg')
for p in polar:
plt.plot([0,1],[p[0],p[0]],c='red')
plt.imshow(final,cmap=plt.cm.gray)
plt.show
Retric Here is what I get: draw.line([(x1,y1),(x2,y2)],fill = (255, 255, 255))
The result is a white line, but I want a transparent line, what should I do? Kay Patel As far as I know, the line function takes RGB or RGBA values. try: draw.line([(x1,y1),(x2,y2)
Retric Here is what I get: draw.line([(x1,y1),(x2,y2)],fill = (255, 255, 255))
The result is a white line, but I want a transparent line, what should I do? Kay Patel As far as I know, the line function takes RGB or RGBA values. try: draw.line([(x1,y1),(x2,y2)
Retric Here is what I get: draw.line([(x1,y1),(x2,y2)],fill = (255, 255, 255))
The result is a white line, but I want a transparent line, what should I do? Kay Patel As far as I know, the line function takes RGB or RGBA values. try: draw.line([(x1,y1),(x2,y2)
smoked The program reads the image located at C:/Square.png and draws lines on it. Also defines the plot title. I want to display the whole image in a tkinter window. what should I do? Here is the image. The name has to be changed and we can run the code. http
KhoaLearnToCode I'm having a problem here when trying to draw multiple lines on an image. So, here is my code: fig=plt.figure()
final = cv2.imread('frame9.jpg')
for p in polar:
plt.plot([0,1],[p[0],p[0]],c='red')
plt.imshow(final,cmap=plt.cm.gray)
plt.show
stack I'm trying to draw a rectangle that is basically a circle, with a square on one end. Kind of like a battery. I have some limitations, basically this can only be done with a single paint object and should be able to support strokes. Here is my code so far
KhoaLearnToCode I'm having a problem here when trying to draw multiple lines on an image. So, here is my code: fig=plt.figure()
final = cv2.imread('frame9.jpg')
for p in polar:
plt.plot([0,1],[p[0],p[0]],c='red')
plt.imshow(final,cmap=plt.cm.gray)
plt.show
smoked The program reads the image located at C:/Square.png and draws lines on it. Also defines the plot title. I want to display the whole image in a tkinter window. what should I do? Here is the image. The name has to be changed and we can run the code. http
Retric Here is what I get: draw.line([(x1,y1),(x2,y2)],fill = (255, 255, 255))
The result is a white line, but I want a transparent line, what should I do? Kay Patel As far as I know, the line function takes RGB or RGBA values. try: draw.line([(x1,y1),(x2,y2)
Retric Here is what I get: draw.line([(x1,y1),(x2,y2)],fill = (255, 255, 255))
The result is a white line, but I want a transparent line, what should I do? Kay Patel As far as I know, the line function takes RGB or RGBA values. try: draw.line([(x1,y1),(x2,y2)
smoked The program reads the image located at C:/Square.png and draws lines on it. Also defines the plot title. I want to display the whole image in a tkinter window. what should I do? Here is the image. The name has to be changed and we can run the code. http
KhoaLearnToCode I'm having a problem here when trying to draw multiple lines on an image. So, here is my code: fig=plt.figure()
final = cv2.imread('frame9.jpg')
for p in polar:
plt.plot([0,1],[p[0],p[0]],c='red')
plt.imshow(final,cmap=plt.cm.gray)
plt.show
KhoaLearnToCode I'm having a problem here when trying to draw multiple lines on an image. So, here is my code: fig=plt.figure()
final = cv2.imread('frame9.jpg')
for p in polar:
plt.plot([0,1],[p[0],p[0]],c='red')
plt.imshow(final,cmap=plt.cm.gray)
plt.show
KhoaLearnToCode I'm having a problem here when trying to draw multiple lines on an image. So, here is my code: fig=plt.figure()
final = cv2.imread('frame9.jpg')
for p in polar:
plt.plot([0,1],[p[0],p[0]],c='red')
plt.imshow(final,cmap=plt.cm.gray)
plt.show
stack I'm trying to draw a rectangle that is basically a circle, with a square on one end. Kind of like a battery. I have some limitations, basically this can only be done with a single paint object and should be able to support strokes. Here is my code so far
ChiHong I am trying to do text segmentation. Attached below is its result. I managed to form lines to split the image. However, I'm stuck at splitting the image based on the lines I found. As marked in the attached image (red text), I want to split the image i
Daniel Heberridge I have the code from the tutorial and I want to detect straight lines in an image. I have this code, but for 1 line HoughLinesP generates hundreds of points instead of 2 (start and end - [x1, y1] and [x2, y2]). Even if I use a blank image I g
learner I am trying to draw contours around an image. I can see that contours are found, but cannot draw contours. The color of the outline appears to be one of two (black and white). import cv2
import numpy as np
import matplotlib.pyplot as plt
from skimage i