Description The load_image function in utility.py contains basic error handling but might not catch all edge cases. For example, cv.imread returns None if the file cannot be read, but this check is sometimes performed after other operations or relies on generic try-except blocks which might mask the actual error.
Solution
- Check explicitly if image is None immediately after cv.imread.
- Add specific exception handling for rawpy and other libraries.
- improved file type validation before attempting to read.
Assign this issue to me under the OSCG
Description The load_image function in utility.py contains basic error handling but might not catch all edge cases. For example, cv.imread returns None if the file cannot be read, but this check is sometimes performed after other operations or relies on generic try-except blocks which might mask the actual error.
Solution
Assign this issue to me under the OSCG