-
Notifications
You must be signed in to change notification settings - Fork 1
Add SVG filters to smooth spectrograms #251
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
base: main
Are you sure you want to change the base?
Conversation
| // Knobs for testing blur filters | ||
| const contrast = ref({slope: 1.2, intercept: -0.1}); | ||
| const gaussianBlur = ref({ stdDeviation: 1.5 }); | ||
| const convolutionMatrix = ref({ order: 5 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For anyone interested in exploring this branch, I've added this reactive state to the component for ease of testing changes.
| /> | ||
| </feComponentTransfer> | ||
| </filter> | ||
| <filter id="spectro-smoothing-gaussian"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that there are now 3 separate filters with unique ids. The filter that is currently applied is determined by code in the geoJSUtils file.
| // quadFeatureLayer.node().css("filter", "url(#apply-color-scheme)"); | ||
| // quadFeatureLayer.node().css("filter", "url(#spectro-smoothing-gaussian)"); | ||
| // quadFeatureLayer.node().css("filter", "url(#spectro-smoothing-convo)"); | ||
| quadFeatureLayer.node().css("filter", "url(#spectro-smoothing-combined)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented-out lines here refer to other filters. Currently the filter combines both techniques (gaussian blur and convolution matrix). For those interested, you can pick a different filter to use to compare.
No description provided.