문제 Color lenna image에서 (x, y) = (255, 254)의 한 개의 pixel을 white로 filling한다. |
1. 코드
int x = 225;
int y = 254;
for (i = 0; i < m_Height; i++)
{
for (j = 0; j < m_Width; j++)
{
if (i == x && j == y) {
*(RGBBuf + (i)*m_Width * 3 + 3 * (j)+0) = 225; //red
*(RGBBuf + (i)*m_Width * 3 + 3 * (j)+1) = 225; //green
*(RGBBuf + (i)*m_Width * 3 + 3 * (j)+2) = 225; //blue
}
}
}
2. 결과
'영상처리' 카테고리의 다른 글
[영상처리] 이진화 영상 (0) | 2022.11.06 |
---|---|
[영상처리] 색 반전 영상 (0) | 2022.11.06 |
[영상처리] 밝기(Brightness) 및 대비(Contrast) (0) | 2022.11.06 |
[영상처리] Region filling (0) | 2022.11.05 |
[영상처리] 실습에서 사용되는 Project 파일 (0) | 2022.11.05 |