Algy / fast-slic

20x Real-time superpixel SLIC Implementation with CPU
MIT License
263 stars 34 forks source link

Performance on multi-channel images #5

Closed gulleh closed 5 years ago

gulleh commented 5 years ago

Hi,

I have a question regarding the performance of this model for multi-channel( > 3) images? Mainly I'm concerned about the running time.

Thanks

Algy commented 5 years ago

Fast-slic currenlty supports 3-channel 8-bit images. It can be modified to support up to 4-channel image(i.e. RGBA). But no more channel than 4 can be supported in the current code structure, because hand-crafted SIMD instructions in use are specialized to 3-channel or 4-channel images. Given support for 4-channel images added, running time of them would be the same as 3-channel ones. If your image has more than 4 channels, you should reduce dimension of color vectors using PCA or other stuff to 3-channel.

gulleh commented 5 years ago

Thanks for your comment. Unfortunately, I can't reduce the dimension.