How to Store Coordinates only once?
Hello, I am interested to know if there's a way to store the coordinates of the detected object only once?
So, when the detection is running it keeps on detecting the object and keeps on appending the coordinate of the same objects again and again(I am using CSV file to write the coordinates). Though there's a slight delta in the coordinates that doesn't matter for now since the object is stationary.
This is what I've now.
for box in y_pred_thresh[0]:
# Transform the predicted bounding boxes for the 300x300 image to the original image dimensions.
xmin = box[2] * 300 / img_width
ymin = box[3] * 300 / img_height
xmax = box[4] * 300 / img_width
ymax = box[5] * 300 / img_height
cv2.rectangle(smallFrame, (int(xmin),int(ymin)),(int(xmax),int(ymax)),(0,250,0), thickness=1,lineType=8)
xcenter=((xmin+xmax)/2) #For center X
ycenter=((ymin+ymax)/2) #For center Y
csv.write(round(xcenter)+ ' , ' + round(ycenter))
csv.write('\n')
csv.close()
cv2.waitKey(0)
return (y_pred_thresh)
Any help is appreciated. Thanks
* Operating System Ubuntu 16.04
* Which commit of this repository you're on: Latest
* Keras version: 2.2.0
* TensorFlow version: 1.9.0
If someone knows what kind of coordinates do we get? Is it pixel coordinate or something else? How can I convert it to Robot Coordinate that is in X Y Z?
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Have I written custom code OS Platform and Distribution TensorFlow installed from Bazel version CUDA/cuDNN version GPU model and memory Exact command to reproduce
Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.
No I wasn't able to store just one coordinate per object but I exported all coordinates to excel and then I ran the remove duplicate coordinates function.