File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 110
110
# get the result image
111
111
# the image will be in RGBA format, as specified in the module config
112
112
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 )
114
114
115
115
# save the result image
116
116
# the image will anything that the module has drawn on top of the input image
117
117
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 )
119
119
120
120
# print the processing logs from the module
121
121
print ('Logs from the module:' )
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ parameters:
30
30
height : 720
31
31
# Add paddings to the frame before processing
32
32
output_frame :
33
- codec : raw-rgba
33
+ codec : jpeg
34
34
# custom drawing on frames function
35
35
draw_func :
36
36
module : src.module.overlay_draw_spec
You can’t perform that action at this time.
0 commit comments