Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor connected components algorithm to also support segmentation use case #4712

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

raybjork
Copy link
Member

@raybjork raybjork commented Jan 14, 2025

We don't support segmentation through our vision APIs yet but theres not a reason our library functions cant start to support this use case. I have an application I'm working on that requires this and it is not possible with existing vision support. This PR refactors the underlying algorithm we use for our detections to return clusters of pixels along with their bounding boxes.

I tested this functionality works by running a test that I don't think has a place in RDK but calls this function with the values in the config below

objectdetection.ColorDetectorConfig{
		SegmentSize:       20, 
		HueTolerance:      .9,
		SaturationCutoff:  .9,
		ValueCutoff:       .9,
		DetectColorString: "#FF660",
}

and applies them to this image
clownfish

to get a mask of just the orange parts
masked

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jan 14, 2025
@raybjork raybjork requested a review from kharijarrett January 14, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants