Question

In: Electrical Engineering

In the MATLAB environment, display an image of a breast mammogram from the MAMMO database. Apply...

In the MATLAB environment, display an image of a breast mammogram from the MAMMO database. Apply gray-level scaling, histogram equalization, and an LOG enhancement mask for image enhancement as given below. Compare the enhanced images to original image qualitatively.

LOG enhancement mask to be convolved with the image:

- 1 -1 -1
- 1 9 - 1
-1 -1 -1

MAMMO database:

http://peipa.essex.ac.uk/pix/mias/

Solutions

Expert Solution

Syntax:

[X, map] = gray2ind(I,n)
[X, map] = gray2ind(BW,n)

Description:

[X, map] = gray2ind(I,n) converts the grayscale image I to an indexed image X. n specifies the size of the colormap, gray(n). n must be an integer between 1 and 65536. If nis omitted, it defaults to 64.

[X, map] = gray2ind(BW,n) converts the binary image BW to an indexed image X. n specifies the size of the colormap, gray(n). If n is omitted, it defaults to 2.

gray2ind scales and then rounds the intensity image to produce an equivalent indexed image.

Class Support:

The input image I can be logical, uint8, uint16, int16, single, or double and must be a real and nonsparse. The image I can have any dimension. The class of the output image X is uint8 if the colormap length is less than or equal to 256; otherwise it is uint16.

Examples:

Convert Grayscale Image to Indexed Image

Try This Example

Read grayscale image into the workspace.

I = imread('cameraman.tif');

Convert the image to an indexed image using gray2ind. This example creates an indexed image with 16 indices.

[X, map] = gray2ind(I, 16);

Display the indexed image.

imshow(X, map);

escription

Histograms are a type of bar plot for numeric data that group the data into bins. After you create a Histogram object, you can modify aspects of the histogram by changing its property values. This is particularly useful for quickly modifying the properties of the bins or changing the display.

Creation

Syntax

histogram(X)

histogram(X,nbins)

histogram(X,edges)

histogram('BinEdges',edges,'BinCounts',counts)

histogram(C)

histogram(C,Categories)

histogram('Categories',Categories,'BinCounts',counts)

histogram(___,Name,Value)

histogram(ax,___)

h = histogram(___)

Description

example

histogram(X) creates a histogram plot of X. The histogram function uses an automatic binning algorithm that returns bins with a uniform width, chosen to cover the range of elements in X and reveal the underlying shape of the distribution. histogram displays the bins as rectangles such that the height of each rectangle indicates the number of elements in the bin.

example

histogram(X,nbins) uses a number of bins specified by the scalar, nbins.

example

histogram(X,edges) sorts X into bins with the bin edges specified by the vector, edges. Each bin includes the left edge, but does not include the right edge, except for the last bin which includes both edges.

histogram('BinEdges',edges,'BinCounts',counts) manually specifies bin edges and associated bin counts. histogram plots the specified bin counts and does not do any data binning.

example

histogram(C), where C is a categorical array, plots a histogram with a bar for each category in C.

histogram(C,Categories) plots only the subset of categories specified by Categories.

histogram('Categories',Categories,'BinCounts',counts) manually specifies categories and associated bin counts. histogram plots the specified bin counts and does not do any data binning.

example

histogram(___,Name,Value) specifies additional options with one or more Name,Value pair arguments using any of the previous syntaxes. For example, you can specify 'BinWidth' and a scalar to adjust the width of the bins, or 'Normalization' with a valid option ('count', 'probability', 'countdensity', 'pdf', 'cumcount', or 'cdf') to use a different type of normalization. For a list of properties, see Histogram Properties.

histogram(ax,___) plots into the axes specified by ax instead of into the current axes (gca). The option ax can precede any of the input argument combinations in the previous syntaxes.

example

h = histogram(___) returns a Histogram object. Use this to inspect and adjust the properties of the histogram. For a list of properties, see Histogram Properties.

Input Arguments

expand all

X — Data to distribute among bins
vector | matrix | multidimensional array

C — Categorical data
categorical array

nbins — Number of bins
positive integer

edges — Bin edges
vector

Categories — Categories included in histogram
cell array of character vectors | categorical vector

counts — Bin counts
vector

ax — Target axes
Axes object | PolarAxes object

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: histogram(X,'BinWidth',5)

The histogram properties listed here are only a subset. For a complete list, see Histogram Properties.

expand all

'BarWidth' — Relative width of categorical bars
0.9 (default) | scalar in range [0,1]

'BinLimits' — Bin limits
two-element vector

'BinLimitsMode' — Selection mode for bin limits
'auto' (default) | 'manual'

'BinMethod' — Binning algorithm
'auto' (default) | 'scott' | 'fd' | 'integers' | 'sturges' | 'sqrt' | ...

'BinWidth' — Width of bins
scalar

'DisplayOrder' — Category display order
'data' (default) | 'ascend' | 'descend'

'DisplayStyle' — Histogram display style
'bar' (default) | 'stairs'

'EdgeAlpha' — Transparency of histogram bar edges
1 (default) | scalar value between 0 and 1 inclusive

'EdgeColor' — Histogram edge color
[0 0 0] or black (default) | 'none' | 'auto' | RGB triplet or color name

'FaceAlpha' — Transparency of histogram bars
0.6 (default) | scalar value between 0 and 1 inclusive

'FaceColor' — Histogram bar color
'auto' (default) | 'none' | RGB triplet or color name

'LineStyle' — Line style
'-' (default) | '--' | ':' | '-.' | 'none'

'LineWidth' — Width of bar outlines
0.5 (default) | positive value

'Normalization' — Type of normalization
'count' (default) | 'probability' | 'countdensity' | 'pdf' | 'cumcount' | 'cdf'

'NumDisplayBins' — Number of categories to display
scalar

'Orientation' — Orientation of bars
'vertical' (default) | 'horizontal'

'ShowOthers' — Toggle summary display of data belonging to undisplayed categories
'off' (default) | 'on'

Plotting Commands Basic xy Plotting Commands axis Sets axis limits. fplot Intelligent plotting of functions. grid Displays gridlines. plot Generates xy plot. print Prints plot or saves plot to a file title Puts text at top of plot. xlabel Adds text label to x-axis. ylabel Adds text label to y-axis. Plot Enhancement Commands axes Creates axes objects. close Closes the current plot. close all Closes all plots. figure Opens a new figure window. gtext Enables label placement by mouse. hold Freezes current plot. legend Legend placement by mouse. refresh Redraws current figure window. set Specifies properties of objects such as axes.


Related Solutions

A mammogram was used to screen for breast cancer in 200 women with breast cancer diagnosed...
A mammogram was used to screen for breast cancer in 200 women with breast cancer diagnosed by a biopsy and in 500 age- and race-matched women without breast cancer. The results of the mammogram were positive in 150 of the women with breast cancer and in 100 of the women without breast cancer. b. Compute the i) sensitivity, ii) specificity, iii) positive predictive value, and iv) negative predictive value. c. Make a statement about each of the computations d. If...
Breast cancer specialists use BI-RADS scores (a whole number from 1 to 6) to classify mammogram...
Breast cancer specialists use BI-RADS scores (a whole number from 1 to 6) to classify mammogram findings. A score of 1 indicates a negative finding, while 6 indicates clear malignancy. The data set mammography.csv contains observations on 950 women who had mammograms and subsequent biopsies. Of interest is whether mean BIRADS score is, in fact, higher for women who have malignancies. For each woman, we have a BI-RADS score and the result of her biopsy (benign or malignant) respectively as...
A patient goes to the gynecologist's office after finding a lump in her breast. A mammogram...
A patient goes to the gynecologist's office after finding a lump in her breast. A mammogram is performed and a tumor is found. Prior to the mammogram, the nurse questions the patient about other family members that have been diagnosed with breast cancer. What is the rationale for this question and what is its significance? Descibe the term carcinoma in situ. Explain how grading and staging of tumors is determined. How does staging of tumors affect treatment options? What are...
CANCER CASE STUDY: A routine mammogram showed a large mass in the right breast of Mrs....
CANCER CASE STUDY: A routine mammogram showed a large mass in the right breast of Mrs. H., age 42. A biopsy confirmed the presence of a malignant tumor. Mrs. H. was concerned because her mother and aunt had breast cancer. No metastases were detected at this time. A mastectomy was performed and a number of axillary and mediastinal nodes were removed. Pathologic examination showed several nodes from each area contained malignant cells. Given this case was considered to be stage...
A recent study found that 85​% of​ breast-cancer cases are detectable by mammogram. Suppose a random...
A recent study found that 85​% of​ breast-cancer cases are detectable by mammogram. Suppose a random sample of 13 women with breast cancer are given mammograms. Find the probability that all of the cases are​ detectable, assuming that detection in the cases is independent. The probability that all of the cases of breast cancer are detectable is about
Your patient’s mammogram is positive for breast cancer which has a fairly low rate in your...
Your patient’s mammogram is positive for breast cancer which has a fairly low rate in your state of 1 case per 1,000 women annually. You know from the literature that the mammogram test has a sensitivity of around 92% and a specificity of 95% depending on the study. What do you tell your patient when she asks do I have breast cancer. Show your work in both a contingency table and using the shortcut Bayes Theorem.
1- Write a Matlab program to perform image resizing, image rotation to 90 degrees, conversion to...
1- Write a Matlab program to perform image resizing, image rotation to 90 degrees, conversion to binary and gray scale, Image segmentation and extraction, draw and find the region of interest with a circle, Plot bounding box, Region extraction and histogram. 2- Write a MATLAB program to Design a GUI calculator which is as shown in below figure 1. Add tool bar options to the GUI calculator and Highlight specific codes written in program and signify the steps followed.
Using Matlab 1. Create a color image of size 200 × 200. The image should have...
Using Matlab 1. Create a color image of size 200 × 200. The image should have a blue background. 2. Create 100 yellow regions within the image that have a variable size. More specifically, their width should be an odd number and vary between 3 and 7 and their height should also be an odd number and vary between 3 and 7. For example, you may get rectangular regions of size 3 × 3, 3 × 5, 5 × 3,...
what are the thing to apply at home for breast cancer patient
what are the thing to apply at home for breast cancer patient
Matlab question: 1. Implement image filtering in frequency domain on the "testtpattern512.tif" image. You will design...
Matlab question: 1. Implement image filtering in frequency domain on the "testtpattern512.tif" image. You will design the filter, and filter the image in the frequency domain, then use inverse DFT to display the filtered image in the spatial domain. Assume zero padding for filtering process. a- Design a rectangular ideal low pass filter with a cutoff frequency of (Uo, Vo), filtering the image so that the vertical lines are blurred together, horizontal lines are basically intact and the letters are...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT