Skip to content

Added function to label bolts#3

Open
martindgr wants to merge 1 commit intomasterfrom
martindgr-patch-1
Open

Added function to label bolts#3
martindgr wants to merge 1 commit intomasterfrom
martindgr-patch-1

Conversation

@martindgr
Copy link
Owner

I have added order_bolts() to return an ordered list of bolts (clockwise from top) that slots in pretty well, I can put it into ret_centres() at a later date as it isn't really necessary to have a separate function, let me know your thoughts

I have added order_bolts() to return an ordered list of bolts (clockwise from top) that slots in pretty well, iI can put it into ret_centres() at a later date as it isn't really necessary to have a separate function, let me know your thoughts
bolt_no = 0
for i in bolts_ord :
bolt_no += 1
cv2.putText(img, f'{bolt_no}', (i[1], i[0]), cv2.FONT_HERSHEY_SIMPLEX, 1, (255,255,255), 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to a different color to make numbers visible against the white bolt masks

Copy link
Contributor

@msekatchev msekatchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked for me, thank you Dan.
I made a few small changes that I will add in another merge later, mainly:
Changed L = int(r*1.1) to L = int(r*1.5) in ret_centres(), which worked better for detecting all the bolts around my radius 120 PMT (wasn't detecting all of them before).
Changed the text mask color to make the numbers more visible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants