[英]Is it possible automate to changing all colors in an image to random colors?
我正在尝试提出一种新的图像增强功能,它可以像上面那样自动改变 colors,但不仅仅是花。 以上是一个 Photoshop 示例,但我想自动将图像中的所有 colors 切换为不同的随机颜色。 这可以为此创建一个 function 吗? 有随机卷积和随机抖动等增强功能,但这些并不是我想要的。 我想保持饱和度和值相同,只是改变颜色。
您可以将随机 0 到 255 的移位添加到 BGR 中的每个通道并取模 256。
在 python 中,它看起来像:
shift = numpy.random.randint(256, size=(1,1,3)) color_shifted_img = img + shift color_shifted_img = numpy.mod(color_shifted_img, 256)
[英]how to fill image with gradient of 3 random colors?
[英]List of all colors in an image using opencv and python
[英]Colors in grayscale image
[英]Changing colors of picture with opencv in c
[英]Match all green colors in HLS
[英]How to transfer the colors of an image to another?
[英]how to cluster colors in a single image?
[英]OpenCV - Machine learning with Image Colors
[英]Get main colors of pixels in an image
[英]Detecting warm colors in the Python image
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.