Question

QWrite a code to show the histogram of ('rice.png') then enhance the result of histogam and...

QWrite a code to show the histogram of ('rice.png') then enhance the result of histogam and
show the image of it.

Q If you convert the image (G) to double form, what you think the result will be?
G=[0 200
255 0]

Homework Answers

Answer #1

Write code to show the histogram of ('rice.png') then enhance the result of the histogram and show the image of it.

Ans:

Code to read the png image and to create a histogram of that image:

Note: Used MATLAB for Coding

I = imread('rice.png');
imshow(I)

figure;
imhist(I);

If you convert the image (G) to double form, what you think the result will be?

Ans:

Input image, specified as a numeric scalar, vector, matrix, or multidimensional array. If the Parallel Computing Toolbox is installed, then G can be a gpuArray and im2double converts G on a GPU.

For example:

I1 = im2double(I) converts the intensity image I to double precision, rescaling the data if necessary. I can be a grayscale intensity image, a truecolor image, or a binary image. If the input image is of class double, then the output image is identical.

Remember: The im2double function does not rescale the output when the input image has single or double data type. If your input image is a truecolor image of data type single or double with pixel values outside this range, then you can use the rescale function to scale pixel values to the expected range [0, 1].

Hope I answered the question

If you have any doubts , feel free to ask.

And if you like my answer, then please upvote for this answer, your feedback really matters alot.

STAY HOME STAY SAFE

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a matlab code for following : Load image ‘Balloon.tif’ into Matlab .  Develop a...
Write a matlab code for following : Load image ‘Balloon.tif’ into Matlab .  Develop a function to mark all pixels in green with 1 and 0 for the rest. Display the result image  Convert it into a grayscale image, denoted with ‘img1’  Create a copy of the clean grayscale image, denoted with ‘img2’, in the memory and add salt and pepper noise to it using imnoise  Remove salt and pepper noise using function medfilt2 and display...
1. Code is already written please show all outputs and comment on function of code. 2....
1. Code is already written please show all outputs and comment on function of code. 2. These are Python 3 programs. Please show outpouts and comment on fuctions. Note: this is a bit of a “backwards” exercise – we show you code, you figure out what it does. As a result, not much to submit – don’t worry about it – you’ll have a chance to use these in other exercises. >>> feast = ['lambs', 'sloths', 'orangutans', 'breakfast cereals', 'fruit...
1) ADD a button that says "Change Pictures" 2) WRITE some code to handle the button...
1) ADD a button that says "Change Pictures" 2) WRITE some code to handle the button event (in other words, when you press the button, this is the code that it goes to). In that code, change the pictures. JAVA CODE: import javafx.application.Application; import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.layout.GridPane; import javafx.geometry.Insets; import javafx.scene.image.Image; import javafx.scene.image.ImageView; /** * This program demonstrates the GridPane layout container. */ public class GridPaneImages extends Application { //THESE ARE global (vs local) variables // which means...
We have provided the R code that calculates the information for the 7-number summary, histogram and...
We have provided the R code that calculates the information for the 7-number summary, histogram and boxplot for all observations and for the data with four outliers removed. Do you think that Age is a useful variable? Yes or no and explain. Min: 2.00 1st Qu: 19.00 Median: 20.00 Mean: 19.87 3rd Qu: 21.00 Max: 69.00 NA: 2 (after outliers removed) Min: 17.00 1st Qu: 19.00 Median: 20.00 Mean: 19.68 3rd Qu: 21.00 Max: 23.99 NA: 2
APPLIED STATISTICS 2 USE R CODE ! SHOW R CODE! Write a function to calculate the...
APPLIED STATISTICS 2 USE R CODE ! SHOW R CODE! Write a function to calculate the sum of cubes from 1 to n, but skip the multiple of 5. Say, if n=10, the result is 1^3+2^3+3^3+4^3+6^3+7^3+8^3+9^3. The input is the value of n, the output is the summation. (you need if statement to check whether a number is a multiple of 5.In R, a%%b is the remainder for a divided by b. So, we have 10%%5=0) APPLIED STATISTICS 2 USE...
What would be the result after the following code is executed? final int SIZE = 25;...
What would be the result after the following code is executed? final int SIZE = 25; int[] array1 = new int[SIZE]; // Code that will put values in array1 int value = 1; for (int a = 0; a < array1.length; a++) { array1[a] = value; value = value + array1[a]; }
Re-write following if-else-if statements as Switch statement. Your final code should result in the same output...
Re-write following if-else-if statements as Switch statement. Your final code should result in the same output as the original code below. if (selection == 10) System.out.println("You selected 10."); else if (selection == 20) System.out.println("You selected 20."); else if (selection == 30) System.out.println("You selected 30."); else if (selection == 40) System.out.println("You selected 40."); else System.out.println("Not good with numbers, eh?"); Second question Re-write following while loop into Java statements that use a Do-while loop. Your final code should result in the same...
Q1: Re-write following if-else-if statements as Switch statement. Your final code should result in the same...
Q1: Re-write following if-else-if statements as Switch statement. Your final code should result in the same output as the original code below. if (selection == 10) System.out.println("You selected 10."); else if (selection == 20) System.out.println("You selected 20."); else if (selection == 30) System.out.println("You selected 30."); else if (selection == 40) System.out.println("You selected 40."); else System.out.println("Not good with numbers, eh?"); Q2: Re-write following while loop into Java statements that use a Do-while loop. Your final code should result in the same...
Use C code please! Write the function definition for a function called FindQuo that takes one...
Use C code please! Write the function definition for a function called FindQuo that takes one argument of type double (arg1 ) and returns a double.  The purpose of the function is to calculate the quotient of arg1 divided by a double (num) that will be entered by the user. Inside the function declare ask and get a double value from the user called num Use a loop (while or do/while) to ensure that the user does not enter a 0.0....
Directions: Convert the following problems below to c++ equivalent code Problem 6: Get a random number...
Directions: Convert the following problems below to c++ equivalent code Problem 6: Get a random number from the user Remember the original number Add 3 to the number Double the number and then multiply by Knock off the last digit (remove the 1’s place) Finally remove the original number What is the result? Problem 7: 1: Have the person write down any three digits number with decreasing digits (432 or 875). 2: Reverse the number you wrote in #1. 3:...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT