NightRaven109 commited on
Commit
86b7cbf
·
verified ·
1 Parent(s): 3bc7f68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -208,6 +208,11 @@ def infer(path_input, seed=None):
208
  # Get intensity map from original image
209
  intensity_map = get_image_intensity(input_array, gamma_correction=1.0)
210
 
 
 
 
 
 
211
  # Blend depth with intensity map
212
  blended_result = blend_numpy_images(
213
  cv2.cvtColor(depth_array, cv2.COLOR_RGB2BGR if len(depth_array.shape) == 3 else cv2.COLOR_GRAY2BGR),
 
208
  # Get intensity map from original image
209
  intensity_map = get_image_intensity(input_array, gamma_correction=1.0)
210
 
211
+ # Resize intensity_map to match depth_array dimensions
212
+ depth_height, depth_width = depth_array.shape[:2]
213
+ if intensity_map.shape[:2] != (depth_height, depth_width):
214
+ intensity_map = cv2.resize(intensity_map, (depth_width, depth_height), interpolation=cv2.INTER_LINEAR)
215
+
216
  # Blend depth with intensity map
217
  blended_result = blend_numpy_images(
218
  cv2.cvtColor(depth_array, cv2.COLOR_RGB2BGR if len(depth_array.shape) == 3 else cv2.COLOR_GRAY2BGR),