Image Buffer Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.

Slides:



Advertisements
Similar presentations
A Short Review Arrays, Pointers and Structures. What is an Array? An array is a collection of variables of the same type and placed in memory contiguously.
Advertisements

UNIT IV.
Chapter 19 Vectors, templates, and exceptions Bjarne Stroustrup
An Introduction to Windows Programming (MFC) Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering.
Java POWERED BY: ARVIND DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING RADHA GOVIND GROUP OF INSTITUTIONS,MEERUT.
Constructor. 2 constructor The main use of constructors is to initialize objects. A constructor is a special member function, whose name is same as class.
Image Processing … computing with and about data, … where "data" includes the values and relative locations of the colors that make up an image.
Computer Graphics Tz-Huan Huang National Taiwan University (Slides are based on Prof. Chen’s)
Medical Imaging System Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Unit 11 Latches and Flip-Flops Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Medical Imaging System Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Software Engineering Introduction to Flowcharts Ku-Yaw Chang Assistant Professor Department of Computer Science and Information.
An Introduction to Visible Human Project Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering.
Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
2004/05/03 Clustering 1 Clustering (Part One) Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
Region of Interest Part II Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
CSE 803 Using images in C++ Computing with images Applications & Methods 2D arrays in C++ Programming project 4.
Dynamic Allocation and Linked Lists. Dynamic memory allocation in C C uses the functions malloc() and free() to implement dynamic allocation. malloc is.
Unit 8 Combinational Circuit Design and Simulation Using Gates Ku-Yaw Chang Assistant Professor, Department of Computer Science.
Unit 11 Latches and Flip-Flops Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Unit 12 Registers and Counters Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
1 Classes and Objects. 2 Outlines Class Definitions and Objects Member Functions Data Members –Get and Set functions –Constructors.
Unit 12 Registers and Counters Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Unit 11 Latches and Flip-Flops Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
2004/03/22 Color Models 1 Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Unit 7 Multi-Level Gate Circuits / NAND and NOR Gates Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
Unit 7 Multi-Level Gate Circuits / NAND and NOR Gates Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
C++ / G4MICE Course Session 3 Introduction to Classes Pointers and References Makefiles Standard Template Library.
Programming Design Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Operating System Principles Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
樣式導向設計 (Pattern-Oriented Design) 課程簡介 Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering.
COP1220/CGS2423 Introduction to C++/ C for Engineers Professor: Dr. Miguel Alonso Jr. Fall 2008.
Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Chapter 4 Functions and Program Structure Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering.
Software Engineering Chapter 23 Software Testing Ku-Yaw Chang Assistant Professor Department of Computer Science and Information.
Chapter 2 Getting Started: Drawing Figures. The Framebuffer Lecture 2 Fri, Aug 29, 2003.
Model-View-Controller Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 122 – Data Structures Classes: A Deeper Look Part.
Software Engineering Chapter 16 User Interface Design Ku-Yaw Chang Assistant Professor Department of Computer Science and Information.
Using the JImageViewer classes. JImageViewer classes JImageViewer class JImageViewer class ImagePanel class ImagePanel class Image class Image class.
Computer Science and Software Engineering University of Wisconsin - Platteville 2. Pointer Yan Shi CS/SE2630 Lecture Notes.
Department of Electrical Engineering Electronic Systems Department of Electrical Engineering Electronic Systems Optimization of the mMIPS Sander Stuijk.
計算機視覺 (Computer Vision) 課程簡介 Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Chapter Two The UML – Unified Modeling Language Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
Memory Management Issues, Solutions, and Examples.
PImage. Let’s look at the PImage class in ProcessingPImage –What are the fields (i.e., variables)? –What methods are available? –What about the constructor---how.
GAM 200 Club. How to Game Engine GAM 200 Club Zachary Nawar.
Chapter 18 The Observer Pattern Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Microsoft Foundation Class (MFC) Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Bitmap (Chapter 15).
 A constructor is a special member function whose task is to initialize the objects of its class.  It is special because its name is same as the class.
CreatingClasses-SlideShow-part41 Creating Classes part 4 Barb Ericson Georgia Institute of Technology Dec 2009.
2004/03/23 Image Analysis 1 Image Processing & Analysis Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
Chapter 21 Design Patterns Reviewed from the New Perspective of Object-Oriented Design Ku-Yaw Chang Assistant Professor, Department.
Menu Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Introduction to the Computer Graphics Anton V. Kudinov, Assistant professor of Computer Engineering Department.
Chapter Ten The Bridge Pattern Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Computer Science 320 Barrier Actions. 1-D Continuous Cellular Automata 1-D array of cells, each having a value between 0.0 and 1.0 Each cell has a neighborhood.
Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.
Application for Morphological Image Processing Dan Campbell 12/13/06 University of Wisconsin – Madison Departments of Computer Engineering and Computer.
Chapter 6 Structures Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Chapter 5 Pointers and Arrays Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
MATLAB/SIMULINK Professor Walter W. Olson
Programming for Art: Images
CS148 Introduction to Programming II
Presentation transcript:

Image Buffer Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University

22004/03/15Image Buffer Outline Tools library DocumentView

32004/03/15Image Buffer Logically Logically 2 dimensional array Physically (in memory) Physically (in memory) Usually 1 dimensional array

42004/03/15Image Buffer A 512 * 512 image (logically) 2-byte per pixel 2-byte per pixel Max gray level = 4095 Max gray level = 4095 W = 512 H = 512

52004/03/15Image Buffer A 512 * 512 image (physically) 2-byte per pixel 2-byte per pixel Create (allocate) short * pImage = (short *) malloc(512*512*sizeof(short)); short * pImage = (short *) malloc(512*512*sizeof(short)); Use (access) *(pImage+y*512+x) = 4095 *(pImage+y*512+x) = 4095 Destroy (free) free(pImage) free(pImage)

62004/03/15Image Buffer Tools Library Providing a function to display a 2-byte image buffer on the screen void ShowImage_2B(CDC * pDC, short * pImage, int nWidth, int nHeight); void ShowImage_2B(CDC * pDC, short * pImage, int nWidth, int nHeight); Consisting of tools.lib tools.lib tools.h tools.h Adding these two files into your project.

72004/03/15Image Buffer Document C***Document : public CDocument Add data Image buffer Image buffer short * m_pImage; int m_nWidth; int m_nHeight; Add core functions short * GetImageBuffer() short * GetImageBuffer() int GetImageWidth() int GetImageWidth() int GetImageHeight() int GetImageHeight() Constructor (C***Document) Initialization Destructor (~C***Document) Release resources

82004/03/15Image Buffer View C***View : public CView Process WM_PAINT message #include “tools.h” #include “tools.h” C***View::OnDraw(CDC * pDC) { ShowImage_2B( pDC, pDoc->GetImageBuffer(), pDoc->GetImageWidth(), pDoc->GetImageHeight() ); } C***View::OnDraw(CDC * pDC) { ShowImage_2B( pDC, pDoc->GetImageBuffer(), pDoc->GetImageWidth(), pDoc->GetImageHeight() ); }

92004/03/15Image Buffer Result

102004/03/15Image Buffer Result