Skip to content

Commit 4ba1fe9

Browse files
authoredJan 29, 2025··
fixed template (#934)
1 parent 871a23e commit 4ba1fe9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎samples/template/src/client/run.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@
110110
# get the result image
111111
# the image will be in RGBA format, as specified in the module config
112112
img = np.frombuffer(result.frame_content, dtype=np.uint8)
113-
img = img.reshape(result.frame_meta.height, result.frame_meta.width, 4)
113+
img = cv2.imdecode(img, cv2.IMREAD_COLOR)
114114

115115
# save the result image
116116
# the image will anything that the module has drawn on top of the input image
117117
print(f'Saving result image to {result_img_path}')
118-
cv2.imwrite(result_img_path, cv2.cvtColor(img, cv2.COLOR_RGBA2BGRA))
118+
cv2.imwrite(result_img_path, img)
119119

120120
# print the processing logs from the module
121121
print('Logs from the module:')

‎samples/template/src/module/module.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ parameters:
3030
height: 720
3131
# Add paddings to the frame before processing
3232
output_frame:
33-
codec: raw-rgba
33+
codec: jpeg
3434
# custom drawing on frames function
3535
draw_func:
3636
module: src.module.overlay_draw_spec

0 commit comments

Comments
 (0)
Please sign in to comment.