What codes would have to be put in to this already existing code to change the i
ID: 3712354 • Letter: W
Question
What codes would have to be put in to this already existing code to change the image to the ones shown in the image?
The following code produces the 1st image in 15 images shown below. By manipulating the code, all of the images should be able to be generated. I have generated images 1-9 however, I can't get 10-15.
%Clean up old figures, variables, etc
clear all ;
close all ;
clc;
%Make the animation
n = 100;
im = zeros(n,n);
[xx yy]=meshgrid(1:n,1:n);
tmax = 50;
for time =1:tmax
colormap(gray);
im(:,:) = time*xx/n;
image(im);
drawnow;
end
The images I need help with are numbers 10-15. Thanks!!!
10 12 13 14 15Explanation / Answer
Definations & Introductions:
Image processing sequence for a colour codes from the existing list of images for better pixcels manipulations.
Code Generations Algorthims MATLAB:
Line 1: INPUT: Enter the number of images.
Line 2: Get the value for image n = 100;
Line 3: put the sequence in order by exchanging i.e., F(x) = F(y).
Line 4: Take the color code sequence number for Grid Functions i.e.,F(x,y)
Line 5: Accept the Maximum value for function Max F(x) = 50;
Line 6: Exchange the value for the interchange with maximum. i.e., F(x) = F(y).
Line 7: Mapping the color sequence with different options;
Line 8: Formulating the equations for processing the Image i.e., Image = Time w.r.t F(x,y).
Line 9: Embedding the image into different sequence i.e., Image (F(x,y));
Line 10 : Processing the information according the colour codeing sequence draw the color codes.
Line 11 : Color codes are arranged in the sequence according to the drawing codes.
Line 12: OUTPUT - Color images will be monitored with given numbers.
-----------------------------------------------------------------------------------------------------------------------------
Programs to write to understand the colour code sequence with different colours.
#include<stdio.h>
Void Main()
int add_ten(int x)
{
int y;
Prinf (y = 10);
Color code (y = x + y); // Exchange color codes
return f(y);
}
-------------------------------------------------------------------------------------------------------------------
OUTPUT:
List of color images from given Numbers: 1 - 21
-------------------------------------------------------------------------------------------------------------------------
Descriprtions:
Directed Acyclic Graph (DAG) is a graphical tool that depicts the color representations of structure for the basic blocks for color code generating, helps to see the flow of values flowing among the basic blocks, and offers optimization.
DAG provides easy transformation methods on basic color blocks. DAG tools can be understood here:
Example:
MATLAB Programs code gray color sequence from 1 to 50
% Clean up old figures, variables, constants clear all ;
close all ;
clc;
%Make the animation n = 100;
pixels50 = grayImage == 50;
% Create color ranges r, g & b channels.
redImage = grayImage;
greenImage = grayImage;
blueImage = grayImage;
img = zeros(n,n);
[xx yy]=meshgrid(1:n,1:n);
tmax = 50;
% Change the colors for the pixels that are gray level 50.
redimage(pixels50) = 255;
greenimage(pixels50) = 50;
blueimage(pixels50) = 50;
% Combine into a new RGB image.
rgbimage = cat(redimage, greenimage, blueimage);
for time =1:tmax colormap(gray);
image(:,:) = time*xx/n;
image(im);
drawnow;
end
----------------------------------------------------------------------------------------------------------------------------------
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.