Computer Science 1011B MIDTERM 2 Notes

5 Pages
228 Views
Unlock Document

Department
Computer Science
Course
Computer Science 1011A/B
Professor
Andrew Kope
Semester
Spring

Description
Computer Science 1011B Midterm 2 Notes Lecture 8: - Halo effect in psychology is the cognitive bias where one particular trait, especially good characteristics, influence or extends to other qualities of the person - Lindgaard et al.2006 at the Human Oriented Technology Laboratory found that participants in their studies could form reliable impressions of a website in 50 milliseconds - Pixels: Each screen is made up of pixels (picture elements) o Each pixel is a dot o Laid out in a rectangular grid of rows and columns o Screen resolution is measured by # of pixels wide, by high o The size of pixels has shrunk, making them harder to distinguish with the human eye o Each pixel is made up of three components: red, blue, and green o Red + Blue= Magenta, Green + Blue= Cyan, Red + Green= Yellow, all three=White o Each colour represented by an 8 bit value, ranging from 0-255 in intensity o This gives each pixel a 24 bit sequence - Images: Each image can also be represented by rows and columns of pixels o Example (255,0,0),(255,255,0),(0,255,0),(0,255,255)= Red, Yellow, Green, Cyan - Totally Uncompressed Format: Created by Jamie Andrews for use in this course. o Doesn’t actually exist in the real world, only serves an illustration and comparison purpose 16 o 16bits to represent the image height (2 -1=65,535) (number of rows) 16 o 16bits to represent the image width (2 -1=65,535) (number of columns) o Then data for each pixel, reading left-to-right, top-to-bottom o o Total # of Pixels= 4 + (3 x w x h) - Picture Algorithms o To mirror and image horizontally the rows of pixel data must be reversed o Flipping the image vertically is done by making the top row the bottom row, etc. o Decreasing the size of the image by only storing the even-numbered rows, and every even numbered pixel in each row that’s stored o Break image up into blocks 4 by 4 pixels, calculate the average red, green and blue for each block, finally replace each pixel in block by “average” pixel Lecture 9: - Programming Fundamentals o Six Basic Elements of Programs 1. Output (O) 2. Variables (V) 3. Input (I) 4. Calculations (C) 5. Decisions (D) 6. Repetition (R) o Output: The information or result generated by a computer program. Any meaningful program will have some sort of output. The “result” of the program. o Variables: Hold values that the program needs to work with. Considered the “boxes’ that hold something. The variables can be constant, but more often, variables are manipulated by the program and therefore change. o Input: Information supplied to the computer program. This is what we want the program to work on to provide us with some output. Commonly, Input and Output are referred to with a more general term, I/O. o Calculations: The purpose of a program is to do a task, and the calculation is general the task it must complete. The calculations computers perform can be arbitrarily complex or simple. o Decisions: Have no idea o Repetition: This is known as looping, but they must be limited. o Every programmer builds on the work of previous programmers. The 6 basic elements of programs are the basis of all programming in any programming language o Source Code: Text of computer programs = “source code” o Only meaningful when the programs is processed by another progr
More Less

Related notes for Computer Science 1011A/B

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit