We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 are many ways to normalise an image to 0-1 range. One fun way is to use the image intensity STD and AVG to do that, here's a snippet.
def std_avg_normalisation(img: np.ndarray) -> np.ndarray: """ Arguments: - img: input image to normalise Output: - np.array: the normalised version of the image, as np.float32 """ # Convert the data to float32 img = img.astype(np.float32) img_mean = np.mean(img) img_std = np.std(img) return (img - img_mean)/(4*img_std) + 0.5
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There are many ways to normalise an image to 0-1 range. One fun way is to use the image intensity STD and AVG to do that, here's a snippet.
The text was updated successfully, but these errors were encountered: