result = 1.5 * dolphin;
imshow(result);
function result = scale(img, value)
result = value .* img;
endfunction
dolphin = imread('dolphin.png');
imshow(scale(dolphin, 1.5));
result = blend(dolphin, bicycle, 0.85); imshow(result);
随机应变 ABCD: Always Be Coding and … : хороший
result = 1.5 * dolphin;
imshow(result);
function result = scale(img, value)
result = value .* img;
endfunction
dolphin = imread('dolphin.png');
imshow(scale(dolphin, 1.5));
result = blend(dolphin, bicycle, 0.85); imshow(result);
dolphin = imread('dolphin.png');
bicycle = imread('bicycle.png');
imshow(dolphin);
disp("Dolphin image size:");
disp(size(dolphin));
imshow(bicycle);
disp("Bicycle image size:");
disp(size(bicycle));
summed = dolphin + bicycle;
imshow(summed);
average = dolphin / 2 + bicycle / 2;
imshow(average);
183/2 + 152/2 = 168
(183+152)/2 = 128
% At a given location (row, col): dis(img(50, 100)); dis(img(50, :)); plot(img(50, :));
% At slice of the image: disp(img(101:103, 201:203)); disp(size(img)); % Cropped size: disp(size(cropped));
color planes
img = imread('fruit.png');
imshow(img);
disp(size(img));
img_red = img(:, :, 1);
imshow(img_red);
plot(img_red(150, 0));
2.5, 0.7, 3, 6
3.7, 4.5, 1.9, 3.2
-1.3, 5.2, 7.5, 2.9
Levels:0,1,2,3,4,5
Round down:1.8 -> 1
Limits: <0 -> 0, >5 -> 5
each number always rounding down.
% Load and display an image
img = imread('dolphin.png');
imshow(img);
% Image size:
disp(size(img));
% Image class or data type:
disp(class(img));
hight 320
width 500
class uint8
u -> unsigned
int -> integer
8 -> 8bits
Computational Models(Math!)
Algorithm
Real Images
matlab
https://jp.mathworks.com/
GNU Octave
https://www.gnu.org/software/octave/
An image can be thought of as:
– a 2-dimensional array of numbers ranging from some minimum to some maximu
– a function I of x and y: I(x, y)
– something generated by a camera
Images as functions
we think of an image as a function, f or i, from R^2 to R
f(x, y) gives the intensity or value at position (x, y)
Piratically define the image over a rectangle, with a finite range:
f:[a, b]x[c, d] -> [min, max]
f(x,y) = [r(x,y) g(x,y) b(x,y)]
f:[10, 210]*[15.155] -> [0, 10]
(r,g,b) channels or planes
In computer vision we typically operate on digital images:
sample the 2d space on a regular grid
quantize each sample
Image thus represented as a matrix of integer values.
width 320, height 258, area 82560
3 color -> 82560*3 total color values
>> im = imread(‘peppers.png’); % semicolon or many numbers
>> imgreen = im(:,:,2);
>> imshow(imgreen)
>> line([1 512],[256 256],’color’,’r’)
Optical character recognition(OCR)
technology to convert scanned docs to text
if you have a scanner, it probably came with OCR
Handwritten Digit recognition
Face detection
-most digital cameras can detect faces
Object recognition(in supermarket)
– Evolution Robotics Retail developed LaneHawk, a retail loss-prevention solution that helps turn bottom-of-basket(BOB) losses and in-cart losses into profits in real time.
– The company was acquired by Datalogic 5 year later!
Special effects: motion capture
Earth viewers(3D modeling)
Smart Cars
Vision-based interaction (and games)
Nintendo Wii has camera-based IR tracking build in.
Game changer:KINECT – skeleton technique
Security and curveillance
Medical imaging: 3D imaging MRI.CT image guided surgery
Scene Understanding
sky, mountain, water, ground
how to build system
what is computer vision
-> Goal of computer vision is to write computer programs that can interpret images.
Image (and movies) have become ubiquitous in both production and consumption.
Therefore applications to manipulate images(movies) are becoming core.
As are systems that extract information from imagery
-surveillance
-building 3d representations
-motion capture assisted
front end, back end, mobile, data
Get Request Token
-> Login with Website
-> Create Session ID
-> Get User ID
-> Go to New View
getRequestToken String
getSessionID String
getUserID Int
getMoviesForSearchString
getFavoriteMovies
postToFavorites
getWatchlistMoviews
postToWatchlist