Skip to content

Commit

Permalink
feat: use camera whitebalance instead of calculating a new whitebalan…
Browse files Browse the repository at this point in the history
…ce. camera whitebalance fixes the blue shift.
  • Loading branch information
ccrutchf committed Nov 14, 2024
1 parent 38dc93c commit c820448
Show file tree
Hide file tree
Showing 4 changed files with 196 additions and 64 deletions.
86 changes: 49 additions & 37 deletions experiments/color_correction.ipynb

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions experiments/raw_process.ipynb

Large diffs are not rendered by default.

138 changes: 128 additions & 10 deletions experiments/sam_segmentation.ipynb

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion pyfishsensedev/image/image_processors/raw_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def __next__(self) -> np.ndarray:
self.__has_iterated = True

with rawpy.imread(self.file.as_posix()) as raw:
img = raw.postprocess(gamma=(1, 1), no_auto_bright=True, output_bps=16)
img = raw.postprocess(
gamma=(1, 1), no_auto_bright=True, use_camera_wb=True, output_bps=16
)
img = skimage.exposure.adjust_gamma(img, gamma=self.__gamma)
img = skimage.exposure.equalize_adapthist(img)

Expand Down

0 comments on commit c820448

Please sign in to comment.