-
Notifications
You must be signed in to change notification settings - Fork 1
Add a bounding box tool for NABat spectrograms #245
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
Conversation
b109496 to
f79b6ba
Compare
c3614db to
2d4a564
Compare
2d4a564 to
84fd520
Compare
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.
This looks good and functions like I would expect.
I noticed an issue that I think could be a separate PR. It has to do with making the measurement box go past the bounds of the image. There is a similar issue for Pulse Annotations (my fault) and drawing that box, so I figured it could be a separate PR where we address both. Most users should know if they are exceeding the bounds.
The new issue is #250
The second thing is that when zooming out (especially on uncompressed mode) the text alignment drifts significantly far from the box. I've created a PR that I believe addresses this #249. In that PR I've also included a video demonstrating the drifting and how the new version resolves it. Feel free to modify anything or correct items in that PR because I did it quickly. I've included the video here also for reference.
20251003-BatAI-MeasuringTextAlignment_small.mp4
* fix: adjust text alignment for measuring box * remove duplicate visible declaration in Style types
BryonLewis
left a comment
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.
👍
Fix #201
Changes
Since the NABat spectrogram view has pulse level annotations disabled, there is no way to use the annotation tool to draw bounding boxes on the spectrogram to get rough time and frequency ranges for specific pulses in the image.
This functionality is now replaced in the NABat spectrogram view by a bounding box tool. With the tool, users can draw a box on to the spectrogram. Once the box is drawn, the start time, end time, minimum frequency, and maximum frequency are all displayed as labels around the box.
Users can also click the box to enter "edit mode" and adjust the height and width of the box. As users edit the box, the labels will update to reflect the changes to the values reported.
Video
bbox_tool.mp4
In this video I demonstrate using the bounding box tool. Users click the icon next to the ruler to enable drawing a box. Once the box is drawn, it can be moved using the edit handles provided by GeoJS. The labels update as the user edits the annotation. If the user draws the box such that it spans multiple pulses on a compressed view, a badge will appear on the icon, and the tooltip will change to a message explaining that the user has done this.
@BryonLewis I tried replacing the
offsetby just using x/y values, but the behavior withoffsetseemed to work better here. Not sure how big of a deal that is.TODO: