0% found this document useful (0 votes)
27 views

'Img - JPG' All 'Img - JPG': %leer La Imagen %como Manipular Una Imagen %leer La Imagen

The document discusses how to read and manipulate an image in MATLAB. It loads an image, separates it into the red, green, and blue color channels, crops a section of the image, and displays the original and separated color channels. It also provides information on the Image Acquisition Toolbox, lists the installed video capture adapters, and shows how to get information on the supported formats of a connected webcam and create a video input object to preview the video stream.

Uploaded by

lorena pilla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

'Img - JPG' All 'Img - JPG': %leer La Imagen %como Manipular Una Imagen %leer La Imagen

The document discusses how to read and manipulate an image in MATLAB. It loads an image, separates it into the red, green, and blue color channels, crops a section of the image, and displays the original and separated color channels. It also provides information on the Image Acquisition Toolbox, lists the installed video capture adapters, and shows how to get information on the supported formats of a connected webcam and create a video input object to preview the video stream.

Uploaded by

lorena pilla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

imagen=imread('img.

jpg')%leer la imagen
%COMO MANIPULAR UNA IMAGEN
close all;
imagen=imread('img.jpg')%leer la imagen
r=imagen(:,:,1);
size(r)
imwrite(r,'C:\Users\Lore\Desktop\ejercicio\R.png');
g=imagen(:,:,2);
b=imagen(:,:,3);
cut=imagen(20:100,10:100,:);
figure(1);
imshow(cut);
figure(2);
subplot(1,3,1),imshow(r);
subplot(1,3,2),imshow(g);
subplot(1,3,3),imshow(b);
imtool(imagen);

imaqhwinfo

ans =

struct with fields:

InstalledAdaptors: {'winvideo'}
MATLABVersion: '9.4 (R2018a)'
ToolboxName: 'Image Acquisition Toolbox'
ToolboxVersion: '5.4 (R2018a)'

>> imaqhwinfo('winvideo')

ans =

struct with fields:

AdaptorDllName:
'C:\ProgramData\MATLAB\SupportPackages\R2018a\toolbox\imaq\supportpackage
s\genericvideo\adaptor\win64\mwwinvideoimaq.dll'
AdaptorDllVersion: '5.4 (R2018a)'
AdaptorName: 'winvideo'
DeviceIDs: {[1] [2]}
DeviceInfo: [1×2 struct]

>> imaqhwinfo('winvideo',1)

ans =

struct with fields:

DefaultFormat: 'RGB24_320x240'
DeviceFileSupported: 0
DeviceName: 'CyberLink Webcam Splitter'
DeviceID: 1
VideoInputConstructor: 'videoinput('winvideo', 1)'
VideoDeviceConstructor: 'imaq.VideoDevice('winvideo', 1)'
SupportedFormats: {1×12 cell}
>> cameraInfo=imaqhwinfo('winvideo',1);
>> cameraInfo.SupportedFormats

ans =

1×12 cell array

Columns 1 through 2

{'RGB24_1280x960'} {'RGB24_1600x1200'}

Columns 3 through 4

{'RGB24_160x120'} {'RGB24_320x240'}

Columns 5 through 6

{'RGB24_640x480'} {'RGB24_800x600'}

Columns 7 through 8

{'YUY2_1280x960'} {'YUY2_1600x1200'}

Columns 9 through 10

{'YUY2_160x120'} {'YUY2_320x240'}

Columns 11 through 12

{'YUY2_640x480'} {'YUY2_800x600'}

>> vid=videoinput('winvideo',1,'YUY2_800x600');
>> preview(vid)
Warning: MATLAB has disabled some advanced graphics
rendering features by switching to software OpenGL. For
more information, click here.
>>

You might also like