Skip to content

Commit

Permalink
fixed template (#934)
Browse files Browse the repository at this point in the history
bwsw authored Jan 29, 2025
1 parent 871a23e commit 4ba1fe9
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions samples/template/src/client/run.py
Original file line number Diff line number Diff line change
@@ -110,12 +110,12 @@
# get the result image
# the image will be in RGBA format, as specified in the module config
img = np.frombuffer(result.frame_content, dtype=np.uint8)
img = img.reshape(result.frame_meta.height, result.frame_meta.width, 4)
img = cv2.imdecode(img, cv2.IMREAD_COLOR)

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

# print the processing logs from the module
print('Logs from the module:')
2 changes: 1 addition & 1 deletion samples/template/src/module/module.yml
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ parameters:
height: 720
# Add paddings to the frame before processing
output_frame:
codec: raw-rgba
codec: jpeg
# custom drawing on frames function
draw_func:
module: src.module.overlay_draw_spec

0 comments on commit 4ba1fe9

Please sign in to comment.