SimSIMD
SimSIMD copied to clipboard
Feature: mean of the array `np.mean` => `simsimd.mean`
Describe what you are looking for
If I have image with shape (height, width, num_channel) and I want to compute mean:
numpy
mean = np.mean(x)
If num_channels = 3, I can use OpenCV:
mean = np.mean(cv2.mean(x)[:3])
OpenCV computes mean per channel for RGBA images returning for RGB images array (mean_channel_0, mean_channel_1, mean_2, 0) and we use np.mean() to take average of that.
First works for any shape but slower Second works for images with 3 channels, but faster
Request: mean operation that
- works on any shape
- is faster than OpenCV or numpy version
Can you contribute to the implementation?
- [ ] I can contribute
Is your feature request specific to a certain interface?
It applies to everything
Contact Details
No response
Is there an existing issue for this?
- [x] I have searched the existing issues
Code of Conduct
- [x] I agree to follow this project's Code of Conduct