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

There is a bright line on the sonar image #1

Open
django010 opened this issue Jul 17, 2023 · 1 comment
Open

There is a bright line on the sonar image #1

django010 opened this issue Jul 17, 2023 · 1 comment

Comments

@django010
Copy link

django010 commented Jul 17, 2023

Hello, there is a bright line of approximately two pixels on the left side of my sonar image. Do you know what could be causing this?
2023-07-15 10-30-35 的屏幕截图

@pnarvor
Copy link
Owner

pnarvor commented Jul 17, 2023

This line is actually 4 pixels (bytes) wide. It is actually a 4 bytes wide little endian unsigned int "vertical" array representing the gain of the respective data rows.

In your case, a row should be 260 bytes wide. The actual data is 256 bytes wide (one for each bearing direction), the first 4 being the gain value.

To obtain gain corrected data (You should use gain corrected data if you plan to use the sonar for anything other than visualisation), divide the pixel values of each row by the square root of its associated gain value (don't forget to convert the array to floating point values beforehand).

Note that this gain is not per say a physical gain. It probably correspond to a rescaling of the acoustical data before encoding it on 8bits (256) values. Therefore, if you do not compensate for this gain, you will end up with non-physical artifacts on your sonar data (typical artifact is a dark strip around point-like powerful scatterers)

Note 2: It seems that this "encoding gain" and the time varying gain of the sonar are both encoded into this 4 bytes gain value.

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

2 participants