I found some scripts that handle only gray images with long process times.
function [Y,Xpad] = snn12(X,WINSZ,true)
% [Y,Xpad] = SNN(X[,WINSZ][,progress])
% perform symmetric nearest-neighbor nonlinear edge-preserving filtering on
% an intensity image
%
% * If no window size WINSZ is specified, the default is 5.
% * Setting progress to a nonzero value causes SSN to display
% the current row it is processing.
% Description:
% The SNN filter works by looking at each pair of pixels opposite the
% output (center) pixel. From each pair, the one that is closest to
% the output pixel is used to compute the output (mean of all selected
% pixels).
% Notes:
% Image is converted to double format for processing.
% Copyright Art Barnes, 2005 artbarnesieeeorg
if nargin >= 3
verboseFlag = true;
else
verboseFlag = false;
end
if nargin < 2
WINSZ = 3;
if ~isa(X,'double')
X = im2double(X);
PADDING = floor(WINSZ/2);
Xpad = padarray(X,[PADDING PADDING],'symmetric','pre');
[padRows,padCols] = size(Xpad);
Y = zeros(size(X));
nRowIters = length((PADDING+1):(padRows-PADDING));
count = 1;
for i = (PADDING+1):(padRows-PADDING)
for j = (PADDING+1):(padCols-PADDING)
% window
W = Xpad((i-PADDING):(i+PADDING),(j-PADDING):(j+PADDING));
Wtop = W(1:PADDING,:)';
Wtop = Wtop(:)';
Wtop = [Wtop W(PADDING+1,1:PADDING)];
Wbot = W((end-PADDING+1):end,:)';
Wbot = Wbot(:)';
Wbot = [W(PADDING+1,(end-PADDING+1):end) Wbot];
Wbot = fliplr(Wbot);
NN = [Wtop; Wbot];
NNdiff = abs(NN - W(PADDING+1,PADDING+1)); % or use X(i,j)
[y,ids] = min(NNdiff);
for k = 1:length(ids)
NNnearest(k) = NN(ids(k),k);
Y(i,j) = mean([NNnearest Xpad(i,j)]);
%if verboseFlag & ~mod(count,10)
% fprintf('SNN: %d/%d\n',count,nRowIters);
%end
count = count + 1;
What were the changes you made in this program sir..? bcoz I got the same problem. It doesn't work. It shows error on the "Y(i,j) = mean([NNnearest Xpad(i,j)]);
" line..Thanks for your response.
In remote sensing, mixed pixel characterization and spatial spectral characterization are same. I've little bit confusion.
04 May 2015 5,690 0 View
Want to know recent trends in mixed pixel problem characterization and classification methods in remote sensed imagery.
02 March 2015 5,308 3 View
I find HSI images on this link: http://www.ehu.eus/ccwintco/index.php?title=Hyperspectral_Remote_Sensing_Scenes. But all are having more than 10 no. of channels. Want to know how can I use this in...
02 March 2015 3,224 2 View
I want to study sparse representation of image to denoising applications. If anyone knows basic concepts with paper, matlab source, share it. Thanks in advance
31 December 2014 8,707 4 View
I need some study materials for the sparse coding, dictionary learning and KSVD in image denoising applications. Thanks in advance for reply.
11 December 2014 351 4 View
I want to know the difference between wideband and cooperative spectrum sensing methods in cognitive radios.
11 December 2014 4,655 6 View
I need to estimate the IMFs of EMD of given image. I use PSO to estimate the IMFs of EMD. I don't have much knowlegde about PSO. Anybody help me in PSO programming in Matlab.
10 November 2014 5,491 6 View
I need practical view of PSO like bio intelligence algorithm applications in image segmentation. I'm naive in PSO like concepts. I don't know how to apply it to image segmentation concepts.
06 July 2014 8,948 6 View
I want to know how to extract the features using PCA, if matlab code given, useful to me.
05 June 2014 7,098 3 View
I went through some papers using mean & std deviation to validate the SVM classifier results in hyper spectral image processing classification.
02 March 2014 6,974 4 View
“Here is a thought experiment. Let's place Rodolpho Llinas's jarred-brain on top of a body (Fig. 1). I bet Llinas would argue that his jarred-brain retains its own consciousness, and the android...
11 August 2024 2,483 1 View
Willett, Shenoy et al. (2021) have developed a brain computer interface (BCI) that used neural signal collected from the hand area of the motor cortex (area M1) of a paralyzed patient. The...
10 August 2024 7,180 0 View
After COVID-19 it has seen that EFL learners technological affiliation has raised. In addition, in the post-COVID period learners started to engage AI technologies like ChatGPT while learning...
08 August 2024 8,964 4 View
So I am organizing an AI seminar. What are possible AI projects in the AI for good spirit? something the students can do and have an impact?
08 August 2024 9,437 4 View
The rate of glucose consumption by the neocortex is reduced by over 80% during anesthesia (Sibson et al. 1998), which disables the synapses (Richards 2002) that are inundated by glial tissue (Engl...
08 August 2024 3,118 0 View
How to design human-centered classroom in the age of A.I.?
08 August 2024 347 5 View
Do experts have journals in the field of artificial intelligence and big data that are not indexed by SCI or EI?
05 August 2024 8,836 2 View
Larger brains, which typically contain more neurons, store and transfer more information (Tehovnik and Chen 2015), but the precise relationship between number of neurons and information has yet to...
05 August 2024 1,238 2 View
What's the role of IT & AI in Telecommunication Industry?
05 August 2024 8,264 3 View
AI tools like ChatGPT can enhance research work significantly when used responsibly and in conjunction with thorough human oversight.
05 August 2024 1,842 3 View