본문 바로가기

Computer Science71

(C/C++) Pixel Operation 1. Substraction(Difference) 이미지 차이/오류 확인 $ MSE(Mean Squared Error) = \frac{(Original - Output)^{2}}{Pixels} $ Diff_Y = (inputImg1[j * stride + 3 * i + 2] - inputImg2[j * stride + 3 * i + 2]) * (inputImg1[j * stride + 3 * i + 2] - ipnutImg2[j * stride + 3 * i + 2]) 2. Addition(Embedding) 워터마크와 유사 Y1 = 0.299 * inputImg1[j * stride + 3 * i + 2] + 0.587 * inputImg1[j * stride + 3 * i + 1] + 0.114 * .. 2024. 3. 27.
(C/C++) Color Model 1. RGB 2. RGB Images // Convert for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { // Red outputImg_1[j * stride + 3 * i + 0] = inputImg[j * stride + 3 * i + 0]; outputImg_1[j * stride + 3 * i + 1] = 0; outputImg_1[j * stride + 3 * i + 2] = 0; // Green outputImg_2[j * stride + 3 * i + 0] = 0; outputImg_2[j * stride + 3 * i + 1] = inputImg[j * stride + 3 * i + 1]; outputImg_2[j .. 2024. 3. 27.
(C/C++) Image Format 1. Image File Format Original RAW Lossy Compression JPG Lossless Compression BMP TIFF PNG 2. RAW File Format RAW 파일은 압축 및 가공이 되지 않은 이미지 데이터를 포함하고 있다. 사진을 찍을 때 뷰파인더로 보이는 모든 세부 정보를 담을 수 있다. RAW 파일 포맷은 모든 래스터 파일 유형 중 가장 많은 양의 세부 정보를 저장한다. 3. BMP File Format 4. BMP File Input // BMP File Input BITMAPFILEHEADER bmpFile; BITMAPINFOHEADER bmpInfo; FILE* inputFile = NULL; inputFile = fopen("AICenter.bmp.. 2024. 3. 27.
(C/C++) Resolution(해상도) 1. Image Information Header type size width height bit-depth Data pixels 2. Spatial Resolution 1280×720 (HD) 1920×1080 (Full HD) 3840×2160 (4K) 7680×4320 (8K) 3. Temporal Resolution 1초 당 프레임 수 ex. 30fps, 60fps, 120fps 2024. 3. 27.