[Image Understanding] Color Image 생성하기
Red + Green = Yellow Red + Blue = Magenta Green + Blue = Cyan img1 = zeros(500, 500, 3); img1(50:300, 50:300, 1:2) = 255; img1(250:450, 250:450, 2:3) = 255; figure(1), imshow(img1); zeros()를 통해 500x500 크기의 검정색 이미지를 생성했다. x 좌표가 50~300인 곳, y 좌표가 50~300인 부분은 1(Red), 2(Green) 값을 255(0~255)로 설정하였다. Red와 Green을 섞으면 Yellow이므로, 해당 부분은 Yellow를 띠게 된다. x 좌표가 250~450인 곳, y 좌표가 250~450인 부분은 2(Green), 3(Blue)..
2023.10.10