Unit-1 Color Models in Image and Video
Unit-1 Color Models in Image and Video
Unit-1 Color Models in Image and Video
Additive color:
When two light beams impinge on a
target, their colors add; when two phosphors on a CRT
screen are turned on, their colors add.
Subtractive color:
For ink deposited on paper, the opposite situation
holds: yellow ink subtracts blue from white illumination,
but reflects red and green; it appears yellow.
Undercolor removal
• Sharper and cheaper printer colors:
• Calculate that part of the CMY mix that would be
black, remove it from the color proportions, and add
it back as real black.
Y Signal
I & Q Signal
Audio
Sub Carrier
Component video
Composite video
S-Video
Component Video
Channel Messages:
It contains 3 bytes, first byte is status byte. It has two types
of messages including Voice & Mode messages
1)Voice Messages: it is used to control voice, it sends note on or
off, key pressure, to specify effects such as sustain, vibrato,
tremolo and pitch wheel etc. Here n is status byte
Voice message Status Data byte 1 Data byte2
byte
Note on/off &H8n / Key number Note on/off
&H9n
Key/Channel &HAn / Key number/ pressure Amount/ None
Pressure &HDn
Control/ Program &HBn / Controller/ Program Controller value/
Change &HCn number None
Pitch Bend &HEn MSB LSB
Structure of MIDI message
2)Mode Messages: they form a special case of control change
message, therefore all modes have opcode B. mode messages
determine how an instrument processes MIDI voice messages.
Poly means a device will play back several notes at once if
requested to do so. Default mode is POLY ON
Omni means that devices respond to messages from all channels.
Default is OMNI OFF - pay attention to your own messages only
1st data byte Description Meaning of 2nd data
byte
&H79 Reset all controllers None, set to 0
&H7A Local Control O=0ff, 127=0n
^
Differential coding of audio
Linear∑
^
predictor
k =1
∑ n =i
en in range Quantized
^
Value
e=0 24 -8 56 56 -255 to -240 -248
-239 to -224 -232
f=130 154 134 200 223
-24
Input and output values are not same -15 to 0
-8
1 to 16 8
130 142 144 167 17 to 32 24
4) Adaptive DPCM(ADPCM):
It uses idea of adapting the coder to suit the input
much further. It uses adaptively modified quantizer, by
^
Coding (APC).
It includes two type of adaptive predictors: Forward or
Backward. The number of previous values used is called
M
∑ of predictor.
as order
i =1
fn= ai fn-i
Unit-3
oop key points
2. Object-Oriented ActionScript
2.2.1 Class Syntax
2.2.4 Encapsulation
Objects are said to encapsulate their property values and method source
code from the rest of the program.
Encapsulation is an important aspect of object-oriented design because it
allows different programmers to work on different classes
2. Object-Oriented ActionScript
2.2.5 Datatypes
– Each class in an object-oriented program can be thought of as defining a unique
kind of data, which is formally represented as a datatype in the program.
– A class effectively defines a custom datatype.
public var speed:Number;
2.2.6 Inheritance
When developing an object-oriented application, we can use inheritance
to allow one class to adopt the method and property definitions of
another.
Using inheritance, we can structure an application hierarchically so that
many classes can reuse the features of a single class.
2.2.7 Packages
In a large application, we can create packages to contain groups of
classes. A package lets us organize classes into logical groups and
prevents naming conflicts between classes.
This is particularly useful when components and third-party class libraries
are involved.
2.2.8 Compilation
When an OOP application is exported as a Flash movie (i.e., a .swf file),
each class is compiled; that is, the compiler attempts to convert each
class from source code to bytecode—instructions that the Flash Player
can understand and execute.
If a class contains errors, compilation fails and the Flash compiler
displays the errors in the Output panel in the Flash authoring tool.
2. Object-Oriented ActionScript
2.2.9 Starting an Objected-Oriented Application
object-oriented application is made up of classes and
objects.
Every Flash application, no matter how many classes or
external assets it contains, starts life as a single .swf
file loaded into the Flash Player.
When the Flash Player loads a new .swf file, it executes the
actions on frame 1 and then displays the contents of
frame 1.
– Create one or more classes in .as files.
– Create a .fla file.
– On frame 1 of the .fla file, add code that
creates an object of a class.
– Optionally invoke a method on the object to
start the application.
– Export a .swf file from the .fla file.
– Load the .swf file into the Flash Player.
Different classes
class TimeTracer TimeTracer Class
{
private var timerInterval:Number;