Q1)****since the images are not provided the procedure to find the same and the commands are provided below**** Green channel of a image(example-pears.png) can be extracted as follows(in MATLAB):-
rgbimage=imread('pears.png');
greenchannel= rgbimage( : ; : ; 2 );
Similarly the green channel of any image can be extracted. All you have to do is change the file name.
A scalar value is a matrix or an array with just a single value. So it can be considered as a 1×1 matrix. So addition of a scalar to a matrix can be done in the following way:-
scalarvalue1=14
scalarvalue2=64
scalarvalue3=8
addedvalue1= rgbimage+scalarvalue1;
addedvalue2=rgbimage+scalarvalue2;
addedvalue3=rgbimage+scalarvalue3;
For subtraction:-
subtractedvalue1=rgbimage-scalarvalue1;
And so on
For multiplication:-
multipliedvalue1=scalarvalue1.*rgbimage;
Dot(.) is used for element vise operation. Since it's a scalar multiplication dot can be omitted. Dot is useful in matrix multiplication.
For division:-
dividedvalue1=rgbimage/scalarvalue1;
Q2) The function bwconncomp can be used to find the connected components of an image. But this function can only work on binary image so we have to first convert it to gray image:-
gimage=rgb2gray('coins.png');
connectedcomponents=bwconncomp (gimage)
b) The words from a image can be done using the ocr function of MATLAB:-
text=ocr(gimage);
It can be saved as a png file using imwrite function as:-
imwrite(text , 'text.png');
Question 1: Consider the following images: a) office_1.jpg d) saturn.png b) pears.png e) rice.png...
This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation inside a class. Task One common limitation of programming languages is that the built-in types are limited to smaller finite ranges of storage. For instance, the built-in int type in C++ is 4 bytes in most systems today, allowing for about 4 billion different numbers. The regular int splits this range between positive and negative numbers, but even an unsigned int (assuming 4 bytes)...