Re: Camera modeling & filter selection
- From: Bernard <cvkiong@xxxxxxxxx>
- Date: Thu, 13 Apr 2006 06:12:32 -0400
Just like what Bjonr have mentioned,I would like to get
a high contrast between apple and bruise as high as
possible, given a CCD, optics and lighting. In order
to get the higest contrast, I also need to look for
the suitable wavelenght which give the highest
contrast and also the bandwidth of filter.
A1= Sum[E*R*T1*L*S]
A2= Sum[E*R*T2*L*S]
B1= Sum[E*R*T1*L*S]
B2= Sum[E*R*T2*L*S]
D= ((A2-A1)/(A1+A2))-((B2-B1)/(B2+B1))
where,
E = light emission
R= obeject's spectral reflectance
T1= bandpass filter transmittance
T2= bandpass filter transmittance
L= Lense's transmittance
S= CCD sensor's sensitivity
I was trying to solve this by writing program using
Matlab. I wrote something like this.
A = dlmread('C:\My Documents\normalfruit.csv');
B = dlmread('C:\My Documents\yake.csv');
Tmax = dlmread('C:\My Documents\Tmax.csv');
% Max. Transmittance was pre-computed using Gaussian
function with standard deviation range from 5 to 30
%Since E, R, L S are same, it was precalculated and
store as A and B respectively.
AT = zeros(861,26); %Allocate space for FT arrays
BT = zeros(861,26); %Allocate space for LT arrays
for p = 1:26
for n = 1:861
AT(n,p) = F(n,1)*Tmax(p,1);
BT(n,p) = L(n,1)*Tmax(p,1);
fprintf ('%6.3f %3d %2d\n', AT(n,p), n, p)
fprintf ('%6.3f %3d %2d\n', BT(n,p), n, p)
end
end
D = zeros(861,861); % Allocate space for D
arrays
for y = 1:861
for z = 1:861
D(y,z) = (((AT(y,1)-AT(z,1))/(AT(y,1)+AT(z,1))))-
...(((BT(y,1)-BT(z,1))/(BT(y,1)+BT(z,1))));
end
end
Dmax = max(max(abs(D)));
fprintf ('The maximum D is %3.4f', Dmax)
clear
%end of file
Although I managed to get the Dmax, which is the
highest contrast value but I failed to get the
suitable wavelenght and filter bandwidth with the
above program.
Can anyone kindly guide me on this. I really need
help in this as I have been trying to work this out
for a long time. Sorry for my elementary question and
bad explanation.
Till then, looking forward to hear from anyone soon.
Thanks in advance.
Have a nice day.
Yours sincerely,
Bernard
.
- References:
- Camera modeling & filter selection
- From: Bernard
- Re: Camera modeling & filter selection
- From: Bjorn Gustavsson
- Re: Camera modeling & filter selection
- From: Bernard
- Camera modeling & filter selection
- Prev by Date: Re: final project
- Next by Date: Structure
- Previous by thread: Re: Camera modeling & filter selection
- Next by thread: Finding minimal values
- Index(es):
Relevant Pages
|