본문내용
/////////////평균값을 이용한 보간법////////////////*/
}
void CTestView::OnZoomin()
{
// TODO: Add your command handler code here
CTestDoc* pDoc = GetDocument(); // 도큐먼트 클래스 참조
ASSERT_VALID(pDoc);
pDoc->ZoomIn(); // CTestDoc 클래스의 ZoomIn() 함수 호출
Invalidate(FALSE); // 화면 갱신
}
void CTestView::OnDraw(CDC* pDC)
{
CTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
// 원영상 출력 위치
for(int y=0;y<256;y++) {
for(int x=0;x<256;x++) {
pDC->SetPixel(x,y,RGB(m_ViewImg[y][x],m_ViewImg[y][x],m_ViewImg[y][x]));
}
}
// 결과영상 출력 위치
for(y=0;y
for(int x=0;x
pDC->SetPixel(x+300,y,RGB(pDoc->m_ResultImg[y][x],pDoc->m_ResultImg[y][x],pDoc->m_ResultImg[y][x]));
}
}
<실행 결과>
2) 영상의 크기 축소
// TestDoc.h : interface of the CTestDoc class
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_TESTDOC_H__B8E521F2_0F21_41A4_85BF_2CD219CE53C4__INCLUDED_)
#define AFX_TESTDOC_H__B8E521F2_0F21_41A4_85BF_2CD219CE53C4__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define scale_x 0.5 // scale_x의 정의 - x축 축소 비율
#define scale_y 0.5 // scale_y의 정의 - y축 축소 비율
class CTestDoc : public CDocument
{
protected: // create from serialization only
CTestDoc();
DECLARE_DYNCREATE(CTestDoc)
void CTestDoc::ZoomOut()
{
int i=0,j=0,y=0,x=0,sum=0;
for(y=0; y<256; y++) {
for(x=0;x<256;x++) {
i=y*scale_y;
j=x*scale_x;
m_ResultImg[i][j]=m_OpenImg[y][x];
}
}
}
void CTestView::OnZoomout()
{
// TODO: Add your command handler code here
CTestDoc* pDoc = GetDocument(); // 도큐먼트 클래스 참조
ASSERT_VALID(pDoc);
pDoc->ZoomOut(); // CTestDoc 클래스의 ZoomIn() 함수 호출
Invalidate(FALSE); // 화면 갱신
}
void CTestView::OnDraw(CDC* pDC)
{
CTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
// 원영상 출력 위치
for(int y=0;y<256;y++) {
for(int x=0;x<256;x++) {
pDC->SetPixel(x,y,RGB(m_ViewImg[y][x],m_ViewImg[y][x],m_ViewImg[y][x]));
}
}
// 결과영상 출력 위치
for(y=0;y
for(int x=0;x
{
pDC->SetPixel(x+300,y,RGB(pDoc->m_ResultImg[y][x],pDoc->m_ResultImg[y][x],pDoc->m_ResultImg[y][x]));
}
}
<실행 결과>
3) 영상의 반사 - 거울 반사
void CTestView::OnMirrorref()
{
// TODO: Add your command handler code here
CTestDoc* pDoc = GetDocument(); // 도큐먼트 클래스 참조
ASSERT_VALID(pDoc);
pDoc->MirrorRef(); // CTestDoc 클래스의 ZoomIn() 함수 호출
Invalidate(FALSE); // 화면 갱신
}
void CTestDoc::MirrorRef()
{
for(int y=0;y<256;y++)
for(int x=0;x<256;x++)
m_ResultImg[y][255-x]=m_OpenImg[y][x];
}
<실행 결과>
4) 영상의 반사 - Flip 반사
void CTestView::OnFlipref()
{
// TODO: Add your command handler code here
CTestDoc* pDoc = GetDocument(); // 도큐먼트 클래스 참조
ASSERT_VALID(pDoc);
pDoc->FlipRef(); // CTestDoc 클래스의 ZoomIn() 함수 호출
Invalidate(FALSE); // 화면 갱신
}
void CTestDoc::FlipRef()
{
for(int y=0;y<256;y++)
for(int x=0;x<256;x++)
m_ResultImg[255-y][x]=m_OpenImg[y][x];
}
<실행 결과>
}
void CTestView::OnZoomin()
{
// TODO: Add your command handler code here
CTestDoc* pDoc = GetDocument(); // 도큐먼트 클래스 참조
ASSERT_VALID(pDoc);
pDoc->ZoomIn(); // CTestDoc 클래스의 ZoomIn() 함수 호출
Invalidate(FALSE); // 화면 갱신
}
void CTestView::OnDraw(CDC* pDC)
{
CTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
// 원영상 출력 위치
for(int y=0;y<256;y++) {
for(int x=0;x<256;x++) {
pDC->SetPixel(x,y,RGB(m_ViewImg[y][x],m_ViewImg[y][x],m_ViewImg[y][x]));
}
}
// 결과영상 출력 위치
for(y=0;y
}
}
<실행 결과>
2) 영상의 크기 축소
// TestDoc.h : interface of the CTestDoc class
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_TESTDOC_H__B8E521F2_0F21_41A4_85BF_2CD219CE53C4__INCLUDED_)
#define AFX_TESTDOC_H__B8E521F2_0F21_41A4_85BF_2CD219CE53C4__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define scale_x 0.5 // scale_x의 정의 - x축 축소 비율
#define scale_y 0.5 // scale_y의 정의 - y축 축소 비율
class CTestDoc : public CDocument
{
protected: // create from serialization only
CTestDoc();
DECLARE_DYNCREATE(CTestDoc)
void CTestDoc::ZoomOut()
{
int i=0,j=0,y=0,x=0,sum=0;
for(y=0; y<256; y++) {
for(x=0;x<256;x++) {
i=y*scale_y;
j=x*scale_x;
m_ResultImg[i][j]=m_OpenImg[y][x];
}
}
}
void CTestView::OnZoomout()
{
// TODO: Add your command handler code here
CTestDoc* pDoc = GetDocument(); // 도큐먼트 클래스 참조
ASSERT_VALID(pDoc);
pDoc->ZoomOut(); // CTestDoc 클래스의 ZoomIn() 함수 호출
Invalidate(FALSE); // 화면 갱신
}
void CTestView::OnDraw(CDC* pDC)
{
CTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
// 원영상 출력 위치
for(int y=0;y<256;y++) {
for(int x=0;x<256;x++) {
pDC->SetPixel(x,y,RGB(m_ViewImg[y][x],m_ViewImg[y][x],m_ViewImg[y][x]));
}
}
// 결과영상 출력 위치
for(y=0;y
pDC->SetPixel(x+300,y,RGB(pDoc->m_ResultImg[y][x],pDoc->m_ResultImg[y][x],pDoc->m_ResultImg[y][x]));
}
}
<실행 결과>
3) 영상의 반사 - 거울 반사
void CTestView::OnMirrorref()
{
// TODO: Add your command handler code here
CTestDoc* pDoc = GetDocument(); // 도큐먼트 클래스 참조
ASSERT_VALID(pDoc);
pDoc->MirrorRef(); // CTestDoc 클래스의 ZoomIn() 함수 호출
Invalidate(FALSE); // 화면 갱신
}
void CTestDoc::MirrorRef()
{
for(int y=0;y<256;y++)
for(int x=0;x<256;x++)
m_ResultImg[y][255-x]=m_OpenImg[y][x];
}
<실행 결과>
4) 영상의 반사 - Flip 반사
void CTestView::OnFlipref()
{
// TODO: Add your command handler code here
CTestDoc* pDoc = GetDocument(); // 도큐먼트 클래스 참조
ASSERT_VALID(pDoc);
pDoc->FlipRef(); // CTestDoc 클래스의 ZoomIn() 함수 호출
Invalidate(FALSE); // 화면 갱신
}
void CTestDoc::FlipRef()
{
for(int y=0;y<256;y++)
for(int x=0;x<256;x++)
m_ResultImg[255-y][x]=m_OpenImg[y][x];
}
<실행 결과>
추천자료
[비쥬얼 베이직 프로그램 소스] 자동차 대여 관리 프로그램 졸업작품
[비쥬얼 베이직 프로그램 소스] 도서 관리 프로그램 소스 졸업작품
[비쥬얼 베이직 프로그램 소스] 컴퓨터 가격 구하기 프로그램
독일 숲유치원이란? 독일의 숲유치원 프로그램에 대한 조사 - 독일 숲유치원의 유래와 프로그램
프로그래밍언어론 - 프로그램 구조 및 예제 프로그램
영유아프로그램개발과평가-혼합연령프로그램의장단점
창신-영유아프로그램개발과평가-보육현장에서 영유아에게 이루어지고 있는 보육프로그램을 조사
지역사회복지의 실천을 위한 프로그램을 기획하고, 프로그램을 어떻게 평가할 것인지 서술.
평생교육프로그램 중 본인의 관심분야를 선정하여 프로그램의 주제를 정한 후 기획안을 작성.
생태유아교육프로그램을 비롯하여 숲 유치원 등 자연에서 학습하는 프로그램이 최근 들어 각...
2016년 2학기 영유아프로그램개발과평가 중간시험과제물 B형(몬테소리 프로그램)
2016년 2학기 영유아프로그램개발과평가 중간시험과제물 A형(하이스코프 프로그램)
2017년 2학기 영유아프로그램개발과평가 중간시험과제물 A형(발도르프 프로그램)
2017년 2학기 영유아프로그램개발과평가 중간시험과제물 B형(뱅크 스트리트 프로그램)
소개글