cioppaanthony / rt-sbs

This repository contains the code for the paper: "Real-Time Semantic Background Subtraction", published at the ICIP 2020 conference.
Other
24 stars 0 forks source link

ViBeGPU for one channel image #7

Closed batman47steam closed 1 year ago

batman47steam commented 1 year ago

Hi, cioppaanthony I wonder whether the ViBeGPU code is suitable for one channel gray image, it seems that in update_ there is only if statement for three channel image, and not for the one channel case, but I think the code wrapped by if statement is also suitable for one channel image ? image thanks again for this wonderful studying

cioppaanthony commented 1 year ago

Hi @batman47steam,

Thank you for your nice comment. :-)

Indeed, the provided code was only meant for RGB channels, but it can be easily adapted for grayscale I think. Note that one very simple way is to transform the grayscale image to a 3-channel image by repeating the channel dimension. However it would be more efficient to only use one channel in the calculations.

It could be that the code right now is agnostic on the number of channels, but I'm not 100% sure. For instance, there may be issues in other parts of the code. Could you please try and let me know if you have an error somewhere?

Thanks in advance.

batman47steam commented 1 year ago

Thanks for the answering, I will give it a try