私の質問は、次のコードの 2 つのヒストグラムが同じである理由です。画像が変化するため、最初のショーは元の画像を表示し、2 番目のショーは完全に黒の画像を表示します。
私はsimpleCVの使い方を間違えていますか、それともおそらくバグですか?
コード:
from itertools import product
from SimpleCV import Image
from SimpleCV import Color
if __name__ == '__main__':
pass
def number_of_hues(picture):
image = Image(picture)
#convert the picture's space to HSV
image = image.toHSV()
image.show()
original_histogram = image.histogram()
(image_x_length, image_y_length) = image.size()
for i,j in product(range(image_x_length), range(image_y_length)):
image[i,j] = Color.BLACK
image.show()
new_histogram = image.histogram()
for o,n in zip(original_histogram, new_histogram):
if o != n:
print o,n