Skip to content

Needle/tools 2D projection #26

Answered by jabarragann
kschwan asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Kim,

I apologize for the delay with this script. This was coded that I wasn't planning to upload so I had to clean it significantly before sending it to you.

The script generates only segmentation masks for the needle based on a thresholding algorithm. It is not perfect, but it should give you a good segmentation mask when only the needle is in the image. Probably, it won't work as well when having both the tool-shaft in the image since it has a very similar color to the needle.

from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
import cv2
import rospy
import numpy as np
import ambf_client as Client
from ambf_client import Client
from pathlib import Path
im…

Replies: 4 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@kschwan
Comment options

@kschwan
Comment options

Comment options

You must be logged in to vote
1 reply
@kschwan
Comment options

Answer selected by kschwan
Comment options

You must be logged in to vote
6 replies
@kschwan
Comment options

@kschwan
Comment options

@adnanmunawar
Comment options

@kschwan
Comment options

@adnanmunawar
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants