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

About the overflow problem of SAR data #15

Open
try-agaaain opened this issue Jan 3, 2025 · 0 comments
Open

About the overflow problem of SAR data #15

try-agaaain opened this issue Jan 3, 2025 · 0 comments

Comments

@try-agaaain
Copy link

This is an excellent dataset, and I am deeply grateful to the author for making it publicly available. It has been extremely helpful for my work. However, there is a issue that users should be aware of when using this dataset:

The values of SAR (Synthetic Aperture Radar) images typically range between 6500 and 6600, but since unsigned int can only represent numbers between 0 and 65535, excessively large values will overflow. This causes some of the values to wrap around and fall into the range of 0 to 100.

When visualizing SAR images, this overflow can result in certain areas appearing unusually dark. This is a clear sign of the overflow issue.

Fortunately, this issue is relatively straightforward to address. I resolved it by applying the following processing function to the SAR images:

def lower_upper_bound(x):
    # Overflow results in values wrapping around to the range of 0–100.
    if x.min() < 2000:  # Overflow detected
        x_t = np.zeros_like(x)
        x_t[x > 2000] = x[x > 2000] - x[x > 2000].min()  # Shift non-overflowed values downward
        x_t[x <= 2000] = x[x <= 2000] + x_t.max()        # Shift overflowed values upward
        return x_t
    return x

This issue may not significantly impact usage, but I think it’s worth highlighting here to ensure a smoother experience when working with this dataset.

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

1 participant