Skip to content

Commit

Permalink
[FIX] Added missing conversion from BGR to RGB after reading an image…
Browse files Browse the repository at this point in the history
… using cv2.imread (#171)
  • Loading branch information
lbferreira authored Aug 22, 2023
1 parent dd691e3 commit ee31add
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions samgeo/hq_sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def generate(
)

image = cv2.imread(source)
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
elif isinstance(source, np.ndarray):
image = source
source = None
Expand Down
1 change: 1 addition & 0 deletions samgeo/samgeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def generate(
)

image = cv2.imread(source)
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
elif isinstance(source, np.ndarray):
image = source
source = None
Expand Down

0 comments on commit ee31add

Please sign in to comment.