no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | microct:currentvspotential.m [2020/06/10 21:42] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <code MATLAB> | ||
+ | % Visualization of different Controlfile setups of the MicroCT at the DKF. | ||
+ | % We aim to plot current [kV] vs. potential [uA] of the x-ray tube. | ||
+ | clc;clear all;close all | ||
+ | Current = [45, | ||
+ | Potential = [88, | ||
+ | |||
+ | figure | ||
+ | plot(Current(1: | ||
+ | hold on | ||
+ | plot(Current(2: | ||
+ | title(' | ||
+ | xlabel(' | ||
+ | xlim([40 75]) | ||
+ | ylabel(' | ||
+ | ylim([50 190]) | ||
+ | |||
+ | print([' | ||
+ | |||
+ | for equalizeHistogram = 0:1; % perform Histogram equalization of read images | ||
+ | for classic = 0:1; % do classic (1) or adaptive (0) equalization | ||
+ | | ||
+ | %% Load Sample R108C21AeROL | ||
+ | for i=1:6 | ||
+ | disp([' | ||
+ | if equalizeHistogram == 1 % Do we want to equalize the Histogram? | ||
+ | if classic == 1 | ||
+ | Im(:,:,i) = imadjust(imread([' | ||
+ | Method = ' | ||
+ | Suffix = ' | ||
+ | disp(' | ||
+ | else | ||
+ | Im(:,:,i) = adapthisteq(imread([' | ||
+ | Method = ' | ||
+ | Suffix = ' | ||
+ | disp(' | ||
+ | end | ||
+ | else | ||
+ | Im(:,:,i) = imread([' | ||
+ | Method = []; | ||
+ | Suffix = []; | ||
+ | end | ||
+ | end | ||
+ | disp(' | ||
+ | | ||
+ | crop=650; | ||
+ | figure(' | ||
+ | for i=1:6 | ||
+ | subplot(2, | ||
+ | imshow(Im(crop: | ||
+ | title([ num2str(Current(i)) ' | ||
+ | subplot(2, | ||
+ | imhist(Im(crop: | ||
+ | end | ||
+ | |||
+ | print([' | ||
+ | |||
+ | %% Load Sample R108C60AeROL | ||
+ | for i=1:6 | ||
+ | disp([' | ||
+ | if equalizeHistogram == 1 % Do we want to equalize the Histogram? | ||
+ | if classic == 1 | ||
+ | Im(:,:,i) = imadjust(imread([' | ||
+ | Method = ' | ||
+ | Suffix = ' | ||
+ | disp(' | ||
+ | else | ||
+ | Im(:,:,i) = adapthisteq(imread([' | ||
+ | Method = ' | ||
+ | Suffix = ' | ||
+ | disp(' | ||
+ | end | ||
+ | else | ||
+ | Im(:,:,i) = imread([' | ||
+ | Method = []; | ||
+ | Suffix = []; | ||
+ | end | ||
+ | end | ||
+ | disp(' | ||
+ | |||
+ | crop=350; | ||
+ | figure | ||
+ | for i=1:6 | ||
+ | subplot(2, | ||
+ | imshow(Im(crop: | ||
+ | title([ num2str(Current(i)) ' | ||
+ | subplot(2, | ||
+ | imhist(Im(crop: | ||
+ | end | ||
+ | |||
+ | print([' | ||
+ | end | ||
+ | end | ||
+ | </ |