Image Resize Program)
- 최초 등록일
- 2010.04.30
- 최종 저작일
- 2010.01
- 2페이지/ 한컴오피스
- 가격 1,500원
소개글
Image Resize Program)
목차
1. resize 하는 프로그램을 작성
2. 고찰
본문내용
문제 :
1. Image Resize Program 256x256 영상을 임의의 floating point 숫자로 지정되는 가로와 세로 비율로 resize 하는 프로그램을 작성(예: 2.23 x 0.87 배). 밝기값을 nearest integer 좌표에 의해 계산하는 버전과 bilinear interpolation으로 계산하는 버전을 작성하여 비교할 것.
2. 교재 3장 Exercises (문제풀이): 2, 3, 4 번
제출 기한: 4월 9일 수업시간
--------------------------------------------------------------------------------
1. resize 하는 프로그램을 작성 (nearest integer & bilinear interpolation) :
(Resizing nearest integer & bilinear interpolation)
▶Resize 작성 코드(nearest integer & bilinear interpolation)>
void CDsp_Ex3Doc::OnResize()
{
// TODO: Add your command handler code here
int x, y, i, j;
unsigned char *ZoomImage;
double Resize_x,Resize_y;
float x1, y1, x2, y2;
float A, B, C, D, a, b, val;
int ix, iy;
// Resize_x = rand()/100; // rand() = 0 ~ 32767
// Resize_y = rand()/100;
Resize_x = 2.23;
Resize_y = 0.87;
int X_max = (int)(Resize_x * 256);
int Y_max = (int)(Resize_y * 256);
ZoomImage = new unsigned char [Y_max * X_max];
참고 자료
없음