How do I find the equation of a curved line from an image? Blood Pressure
I don't know how I compute it in python.
Related
I'm beginning to work on a project with OpenCV (in python), and I'm trying to figure out the best way to tackle the problem I'm facing. I'm trying to get the area of an item in an image...but the surface area I'm looking for is on a 3D object.
So I found this while searching for calculating the area of a contour, but as you can see, this is only for a 2D object. For example, how could I find the area of the red question marks on the sphere in this image? Or the size of the rash on this baby's face (which is most certainly not 2-dimensional)? Is there a way to find the depth of the surface in the image, then use the high color gradient difference to find contours and calculate the difference based on the depths?
I found this deep learning paper (and associated PyTorch library), but was wondering if there was another way that I was missing...
Thanks to all for any ideas / replies.
I'm trying to get the tangent of a polygonal curve I got using approxPolyDP(), I have tried Hough lines and some mathematical formulas for gradient but none of them worked.
I want to get the tangent in the red marks in the image.
I am pretty new to using opencv, and i want to know how can find the distance of this max gap(the highlighted red triangle region). I was thinking of finding the edge first but not sure how to calculate the distance. Like the image i attached, i want to first highlight the portion and then find the max distance(purple line drawn on the last image). The output should be the image with highlight and calculated distance output.
I am working on a detection problem and I have found the mask of the object using cv2.findContours(). However, the found contour has a lot of noise and isn't smooth while the requirement is that it has to be smooth so we can use that smooth contour for our next step.
The obtained mask
The curve I want (the red line)
I have tried cv2.approxPolyDP() to reduce the noise but it is no longer a curve. I was asked to find a smooth curve.
The curve after using cv2.approxPolyDP()
Is there any way to do it?
Is there an optimal way to measure the distance between irregular binary curves?. For instance, in the following image I want to measure the distance between the first and second binary curve and an white area below. I was thinking in use the mean and standard deviation after iterating all columns with a for loop but I don't really know how to implemente it properly. Below the second line there is a white area. What I am trying to do is to measure the distance as soon as a white pixel is found in that area so that I could estimate the distance between the first and second curve against the first white pixel in the area.
Any suggestion or current implementation with tasks like this?