In preprocess config, how to set different roi color for each roi drawing?

In the preprocess config below, there are two ROIs in roi-params-src-0. How to set different color for these two? The roi-color=1;0;1;1 is common for both of the ROIs.

[group-0]
src-ids=0
custom-input-transformation-function=CustomAsyncTransformation
process-on-roi=1
roi-params-src-0=0;540;800;200;100;0;128;500;
roi-color=1;0;1;1

If you want to set diff colors for the roi, could you try to set them to different group? There is only one setting for colors in the same group.

I tried setting them in different groups. But as the source is common it seems to use the 1st group only. I spitted the two rects in different groups giving different colors. But it only shows 1 rect as the source is common. The config I tried is given below:

[group-0]
src-ids=0
custom-input-transformation-function=CustomAsyncTransformation
process-on-roi=1
roi-params-src-0=0;540;800;200
roi-color=1;0;1;1

[group-1]
src-ids=0
custom-input-transformation-function=CustomAsyncTransformation
process-on-roi=1
roi-params-src-0=100;0;128;500
roi-color= 0;1;1;1

Point to be noted -
My application requires multiple RTSP inputs And for each RTSP there are two ROIs (red and yellow) with different ROI locations. So one RTSP camera’s ROI areas are different than others. Currently testing with one source which is not working even with different groups.

OK. We will analyze this issue and respond promptly if there is any updates.

1 Like

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

@Fresher , Cause the preprocess is open source, you can customize your needs by yourself.

sources\gst-plugins\gst-nvdspreprocess\gstnvdspreprocess.cpp

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.