Visual Info Processing Programming Guide (More Details)

Slides:



Advertisements
Similar presentations
Creating Accessible PDF Documents Dick Hemenway CMAC Accessibility Committee.
Advertisements

CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Computer and Programming
Macromedia Director 8 Foundation Level Course. What is Director? Director is a challenging program for creating animation and multimedia productions for.
Functions, Projects, and C++ I/O Streams Dr. Nancy Warter-Perez June 4, 2003.
Programming Basics Aims of Programming: –The aim of programming is to write programs to accomplish complex tasks Programming method: –functional decompositional.
Solve an equation using subtraction EXAMPLE 1 Solve x + 7 = 4. x + 7 = 4x + 7 = 4 Write original equation. x + 7 – 7 = 4 – 7 Use subtraction property of.
1b – Inside Visual Studio Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
KEAN UNIVERSITY Visual C++ Dr. K. Shahrabi. Developer studio Is a self-contain environment for creating, compiling, linking and testing windows program.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
The NetBeans IDE CSIS 3701: Advanced Object Oriented Programming.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Computing IV Visual C Introduction with OpenCV Example Xinwen Fu.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 62 – Manipulating Data Using Methods – Day 1.
1 Real-World File Structures by Tom Davis Asst. Professor, Computer Science St. Edward's University 3001 South Congress Avenue Austin, Texas 78704
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 2 Welcome Application Introducing the Visual Basic 2008 Express Edition IDE.
Measurements in Fluid Mechanics 058:180:001 (ME:5180:0001) Time & Location: 2:30P - 3:20P MWF 218 MLH Office Hours: 4:00P – 5:00P MWF 223B-5 HL Instructor:
A1 Visual C++.NET Intro Programming in C++ Computer Science Dept Va Tech August, 2002 © Barnette ND & McQuain WD 1 Quick Introduction The following.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 5 Working with Images Starting Out with Games & Graphics in.
ImageJ EE4H, M.Sc Computer Vision Dr. Mike Spann
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved CheckWriter Application Introducing Graphics and Printing.
1 Imaging Techniques for Flow and Motion Measurement Lecture 2 Lichuan Gui University of Mississippi 2011 Digital Image & Image Processing.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
CIS-165 C++ Programming I CIS-165 C++ Programming I Bergen Community College Prof. Faisal Aljamal.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
Programming with Visual C++: Concepts and Projects Chapter 2B: Reading, Processing and Displaying Data (Tutorial)
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 3.1 Test-Driving the Welcome Application 3.2.
N from what language did C++ originate? n what’s input, output device? n what’s main memory, memory location, memory address? n what’s a program, data?
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
CSC 1010 Programming for All Lecture 7 Input, Output & Graphics.
#include using namespace std; // Declare a function. void check(int, double, double); int main() { check(1, 2.3, 4.56); check(7, 8.9, 10.11); } void check(int.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
Solve an equation using addition EXAMPLE 2 Solve x – 12 = 3. Horizontal format Vertical format x– 12 = 3 Write original equation. x – 12 = 3 Add 12 to.
11 Debugging Programs Session Session Overview  Create and test a method to calculate percentages  Discover how to use Microsoft Visual Studio.
Open project in Microsoft Visual Studio → build program in “Release” mode.
Exercise 1 #include int main() { printf(“Hello C Programming!\n”); return 0; } 1.Run your Visual Studio 2008 or Create a new “project” and add.
Exploring Spyder: An IDE for scientific computing
Microsoft Visual Basic 2012 CHAPTER FOUR Variables and Arithmetic Operations.
Introduction to Algorithmic Processes CMPSC 201C Fall 2000.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Problem: Take Two Numbers, Add Them Together And Display The Results. Now To Build The Flowchart… We Probably Need One Like This… Let’s Add The Routines…
Submitted by: DRPU Software Team Site:
Visual Info Processing Programming Guide
Chapter 14 Windows Programming with the Microsoft Foundation Classes
Katherine Kampf / kkampf
User-Written Functions
Computer Terms Review from what language did C++ originate?
Chapter 1: An Introduction to Visual Basic 2015
Objectives You should be able to describe: Interactive Keyboard Input
Looking at our “Getting Started” application
Visual programming Chapter 1: Introduction
Chapter 5 Working with Images
Variables and Arithmetic Operations
Getting Image Data Image Data Files 11/15/2018
Lab 1 Introduction to C++.
Visual Basic.
Notes on the color table and indexed color concept
Chapter 2 – Introduction to the Visual Studio .NET IDE
Understanding the Visual IDE
1. Open Visual Studio 2008.
Lab 1 Introduction to C++.
Real-World File Structures
Type Conversion It is a procedure of converting one data type values into another data type In C programming language we are having two types of type conversion.
Computer Terms Review from what language did C++ originate?
INSTRUCTIONAL NOTES There are many similarities between Photoshop and Illustrator. We have attempted to place tools and commands in the context of where.
CS31 Discussion 1D Fall18: week 2
WJEC GCSE Computer Science
Chapter 12 Windows Programming with the Microsoft Foundation Classes
Presentation transcript:

Visual Info Processing Programming Guide (More Details)

Visual Studio 20XX Views Text window Output Build Debug Solution-properties

Microsoft Foundation Class Library Class is a concept in object-oriented programming. In our sample program, we majorly concern 2 classes. MFC represents Windows components (menus, dialogs) as classes. Why it's recommended to add the event handlers in the CKingImageView class?

Bitmap Format File Header: Image Data: Type, size of file, reserved dword, offset to image data, size of header, width, height, color planes, color depth, compress flag, size of image data, horizontal resolution, vertical resolution, number of colors, important colors, RGB palettes. Image Data: The actual image data of the file. From bottom-left. Padding bytes. Use software to convert bitmap images.

Common bugs Using cout in MFC. - Even if you use include iostream, it won’t work. - You can create your own command prompt. - Or simply use AfxMessageBox instead.

Common bugs Accuracy lost. int a=2, b=3; int c = a/b; // It’s not going to be 0.667! Use double variables and convert them back to BYTE.

Common bugs If we have the code: double a,b; int c,d; b=2.5; c=5; d=10; a=c/d; If we run it, a will be 0. Because both c and d are integers, so c/d should result in an integer: 0.

Common bugs If we change the last line to a=b/d, the result will still be 0. Because the compiler will automatically convert the output type of division to the same type as the denominator. Here the denominator d is an integer. Thus the result of b/d will still be an integer: 0.

Common bugs If we have an integer number but want the compiler to recognize it as type double, we must add ".0" at the end of the integer. For example, 5 is of type int, but 5.0 is of type double. 2/5 will be 0, but 2/5.0 will be 0.4.

Common bugs So be careful using data type conversion. Always use explicit conversion – casting. double g = grayscale; pImg[i*iWidth+j] = (BYTE) g; Check if the value of the grayscale is between 0 and 255! if (g < 0.0) g = 0.0; else if (g > 255.0) g = 255.0; else {…}

Common bugs Original image overwritten! Define an array to store the image data. double *arr = new double ... ; for (…) { arr[i*iWidth+j] = (double) pImg[i*iWidth+j]; }

Common bugs Mask template. Use 2 arrays, one as input, one as output.

Verify your result. Compare your output image with professor’s examples. Use GIMP or Photoshop to verify your results. Use your eyes to verify your results.

Examples Draw a filled circle. Create a mirrored image.

Please ask as early as possible. The End Questions? Please ask as early as possible.