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

Parameter details #22

Closed
pjebs opened this issue Apr 1, 2022 · 7 comments
Closed

Parameter details #22

pjebs opened this issue Apr 1, 2022 · 7 comments

Comments

@pjebs
Copy link

pjebs commented Apr 1, 2022

It would be good know in more detail what these parameters do:

type Processor struct {
	BlurRadius     
	SobelThreshold
	PointsThreshold
	MaxPoints
	Wireframe     
	Noise          
	StrokeWidth     
	IsStrokeSolid   
	Grayscale     
	OutputToSVG     
	ShowInBrowser 
	BgColor      
}

I'm trying to adjust the MaxPoints based on the area of the detected face: https://github.com/rocketlaunchr/facemask
so that the face's beauty is still apparent without giving away the person's identity.

It would be good if MaxPoints was 0 and BlurRadius was provided, that the algorithm blurs but does not perform the triangulation process.

@esimov
Copy link
Owner

esimov commented Apr 1, 2022

I will document what each parameter does.

It would be good if MaxPoints was 0 and BlurRadius was provided, that the algorithm blurs but does not perform the triangulation process.

Could you detail a little bit more what is your issue? MaxPoints should be greater than zero because that parameter defines from how many points the vertices will be constructed.

@pjebs
Copy link
Author

pjebs commented Apr 1, 2022

That's right. I understand that. I'm suggesting perhaps allowing MaxPoints to be 0, and if so, no triangulation is applied. Hence if BlurRadious is provided, then the algorithm just blurs.

@esimov
Copy link
Owner

esimov commented Apr 1, 2022

I'm trying to understand why would you need something like that? I can make it to work that way, but just bluring out an image is not the scope of this library. But you might have a solid argument in the favor of your request.

@pjebs
Copy link
Author

pjebs commented Apr 2, 2022

Well it's logically consistent with how the algorithm should behave. After all, if MaxPoints is 0, then that is sensible behaviour.

@evilfunnybird
Copy link

That's right. I understand that. I'm suggesting perhaps allowing MaxPoints to be 0, and if so, no triangulation is applied. Hence if BlurRadious is provided, then the algorithm just blurs.

Dude, just add an "if points==0" in your script and make your blurring, why would you ask for disabling triangles in triangulation library

@pjebs
Copy link
Author

pjebs commented Apr 2, 2022

I want to leverage the blurring that the library already provides.

@esimov
Copy link
Owner

esimov commented Apr 2, 2022

After all it make sense if we take from the logical point of view, because normally when there are zero points, there are no points to generate the vertices from. Also I agree that this way we can leverage the blurring function as an independent method without being interconnected to the triangulation function itself. I have updated the code, but probably won't make a new release for now, so you might change the go.mod file.

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

No branches or pull requests

3 participants