亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tex.m

?? this is texture classification
?? M
字號:
% tex.m
%   
%   This file implements a texture classification example using
%   NeuroSolutions for MATLAB. 
%
%   Problem Definition:
%   The problem is to distinguish between the leopard and the background in
%   which the leopard is sitting in the leopard.jpg file available in the
%   same folder as this script. This problem falls under the category of
%   problem called texture classification which falls under the broader
%   category of pattern classification.
%
%   Solution:
%   The image file (leopard.jpg) is read into a matrix. Small sub images of
%   the image is sampled out. The sampled images are used as training data
%   for a neural network created using NeuroSolutions for MATLAB functions.
%   The neural network is trained using the training data. The trained neural 
%   network is then tested on all parts of the image by sampling the entire 
%   image as small sub-images.
%
%



A = imread('leopard.jpg'); % Read Image into matrix
a = A(:,:,1); % We have used only the Red Channel (Red, Green, Blue - RGB) as Data for Training and Testing. You can use either of the three or all of the three based on the image and the precision in results you want to achieve.
[r,c] = size(a);


%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Display the Leopard image
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Code to position the figure on the screen
screenunits = get(0, 'Units');
set(0, 'Units', 'pixels');
sc = get(0, 'ScreenSize');  % screen co-ordinates

% Show figure
h1 = figure;
h2 = axes('Parent', h1);
image(A); 
set(h1, 'position', [20, sc(4)-(r+50), c, r], 'menubar', 'none', 'Name', 'Sub-sampled images as Training Data');
set(h2, 'Visible', 'Off');



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Sub-Sample 5x5 images from the leopard image for Training
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Sample from the area of the image which consists of the leopard
trainImages1 = [];
count = 1;
for i=125:5:175
   for j = 200:5:300
      trainImages1 = [trainImages1; a(i:i+4,j:j+4)];
      h3 = rectangle ('Position', [j,i,5,5]);
      set(h3, 'FaceColor', [1 0 0])
      count = count + 1;         
   end
end

% Flatten images
% nsFlatten is a function that comes with the toolbox. It flattens images
% into single rows of data for use as training or testing data for a neural
% network
trainImages1 = double(nsFlatten (trainImages1, count-1)); 
% The reason for using "double" function is to convert the uint8 data type
% into double data. The nsTrain function can operate only on double data
% type. Hence we need this casting operation.
trainDesired1 = ones(count-1, 1); % Assign a arbitary number to represent the class "leopard". We are using the number 1 to represent the class leopard


% Sample images from the area of the figure that consists of the background
count = 1;
trainImages2 = [];
for i=200:5:250
   for j = 1:5:100
      trainImages2 = [trainImages2; a(i:i+4,j:j+4)];
      h3 = rectangle ('Position', [j,i,5,5]);
      set(h3, 'FaceColor', [1 1 0]);
      count = count + 1;         
   end
end

% Flatten sub-sampled images uning nsFlatten
trainImages2 = double(nsFlatten (trainImages2, count-1));
trainDesired2 = zeros(count-1,1);  % Assingn a arbitary number to represent the class "background".  We are using the number 0 to represent the class background

% Combine the training data
trainImages = [trainImages1; trainImages2];
trainDesired = [trainDesired1;trainDesired2];

% This step is not neccessary. It is done to achieve better results.
% Shuffle the rows for better distribution of data. Otherwise the neural
% network would train with leopard data all at once and then background
% data all at once. Shuffling the rows will avoid that situation.
trainData = [trainImages trainDesired];
trainData = sortrows(trainData,1); % Since there is no function to randomize rows we are using sortrows as a work around. 

% This step is just for clarity. x is the input data and y is the desired
% data
x = trainData(:,1:end-1);
y = trainData(:,end);

%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Neural network training
%%%%%%%%%%%%%%%%%%%%%%%%%%%
mynet = nsnn; % create neural network
mynet.epochs = 3000; % set the number of epochs
mynet.modelSettings.gradientDescentMethod = 'DeltaBarDelta'; % set gradient descent method
mynet = nsTrain (mynet, x, y); % train


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Break up the entire image into small 5x5 images for use as testing data
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
count = 1;
allImages = [];
for i=1:5:r
   for j = 1:5:c
      allImages  = [allImages; a(i:i+4,j:j+4)];
      count = count + 1;
   end
end

% Flatten the images
z = double(nsFlatten (allImages, count-1));

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Neural network testing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tst = nsTest (mynet, z);
tst = round(tst); % Round off the numbers to achieve crisp 0 or 1 outputs

%%%%%%%%%%%%%%%%%%%%%%%%%%
% Display Testing results
%%%%%%%%%%%%%%%%%%%%%%%%%%

% set up figure
h1 = figure;
h2 = axes('Parent', h1);
image(A); 
set(h1, 'position', [40+c, sc(4)-(r+50), c, r], 'menubar', 'none', 'Name', 'Trained Neural Network Response');
set(h2, 'Visible', 'Off');

% Show results
count = 1;
for i=1:5:r
   for j = 1:5:c
      h3 = rectangle ('Position', [j,i,5,5]);
      if tst(count)>0
         set(h3, 'FaceColor', [1,0,0])
      end        
      count = count + 1;         
   end
end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人性生交大片免费看中文网站| 午夜日韩在线观看| 精品国产免费人成在线观看| 欧美日韩1区2区| 欧美色倩网站大全免费| 欧美少妇xxx| 欧美日韩亚洲综合一区| 欧美日韩精品系列| 欧美日韩国产电影| 91精品免费在线| 日韩一区二区在线看| 精品国产91久久久久久久妲己| 日韩免费视频线观看| 欧美不卡视频一区| 久久久精品一品道一区| 国产欧美综合色| 日韩一区日韩二区| 亚洲一区国产视频| 视频在线观看一区| 久久99精品国产91久久来源 | 国产乱妇无码大片在线观看| 精品中文字幕一区二区| 国产一区二区精品久久91| 激情都市一区二区| a级精品国产片在线观看| 91免费精品国自产拍在线不卡 | 国产精品久久久久久久岛一牛影视| 中文字幕电影一区| 亚洲精品国产品国语在线app| 亚洲激情校园春色| 日本美女一区二区三区视频| 国产真实乱子伦精品视频| 成人综合激情网| 欧美影院午夜播放| 欧美大尺度电影在线| 国产日韩欧美精品电影三级在线| 18欧美亚洲精品| 亚洲地区一二三色| 国产最新精品免费| 91麻豆免费看片| 欧美一区二区三区爱爱| 国产欧美精品一区| 一本一本久久a久久精品综合麻豆| 色婷婷av一区二区三区软件| 6080日韩午夜伦伦午夜伦| 久久久国产精华| 亚洲专区一二三| 激情文学综合插| 91黄色免费观看| 亚洲精品一区二区三区在线观看| 1区2区3区国产精品| 免费成人你懂的| 色综合中文综合网| 欧美日本一区二区三区四区| 久久综合色播五月| 一区二区三区在线视频免费| 免费看日韩精品| 91欧美一区二区| 久久久久国产一区二区三区四区| 夜色激情一区二区| 丁香婷婷综合五月| 日韩午夜精品视频| 亚洲欧美电影一区二区| 九一久久久久久| 欧美色图免费看| 亚洲欧美在线aaa| 激情久久久久久久久久久久久久久久| 欧美性猛片aaaaaaa做受| 中文字幕av一区二区三区免费看| 日韩中文字幕麻豆| 色婷婷综合五月| 日本一二三不卡| 国内不卡的二区三区中文字幕 | 日韩精品一区二区三区四区| 亚洲免费在线观看| 国产成人精品亚洲午夜麻豆| 日韩一卡二卡三卡四卡| 亚洲一区视频在线观看视频| 福利视频网站一区二区三区| 日韩一区二区免费视频| 天天爽夜夜爽夜夜爽精品视频| 99久久精品免费观看| 久久女同精品一区二区| 免费在线看成人av| 欧美日韩精品一二三区| 亚洲免费电影在线| 国产成a人亚洲精品| 精品国产一区二区在线观看| 免费三级欧美电影| 91精品免费在线观看| 亚洲国产精品久久一线不卡| 5566中文字幕一区二区电影| 国产一区二区三区久久久| 91香蕉视频污| 欧美不卡一区二区三区| 日本不卡一区二区| 日韩美女视频一区二区在线观看| 日韩欧美国产wwwww| 欧美激情综合五月色丁香| 六月丁香综合在线视频| 91精品啪在线观看国产60岁| 悠悠色在线精品| 色哟哟亚洲精品| 亚洲精品伦理在线| 91久久国产综合久久| 亚洲精品国产视频| 欧美性xxxxxxxx| 亚洲午夜一区二区| 欧美日本一区二区三区四区| 日韩中文字幕1| 亚洲欧美一区二区三区极速播放 | 日本视频在线一区| 在线不卡免费欧美| 日韩精品一二三四| 欧美不卡视频一区| 国产盗摄女厕一区二区三区| 国产亚洲欧美在线| 成人免费看视频| 亚洲女人小视频在线观看| 欧美系列一区二区| 日本成人在线网站| 91精品黄色片免费大全| 久久99精品国产.久久久久| 久久日一线二线三线suv| 国产不卡高清在线观看视频| 国产精品久久午夜| 日本道免费精品一区二区三区| 亚洲国产成人91porn| 欧美一区二区三区免费| 国产盗摄精品一区二区三区在线| 中文字幕第一区综合| 在线视频你懂得一区| 日韩电影免费在线看| 日韩精品一区二区三区swag | av在线播放不卡| 亚洲成人av在线电影| 欧美大片拔萝卜| 成人一区在线观看| 一区二区三区欧美日韩| 欧美一级爆毛片| 成人久久18免费网站麻豆 | 久久99蜜桃精品| 国产精品午夜在线观看| 欧美视频在线一区二区三区| 日本不卡高清视频| 国产精品久久久久久久第一福利| 精品视频在线免费看| 国产在线精品一区二区三区不卡| 综合中文字幕亚洲| 91精品在线观看入口| 成人精品一区二区三区四区 | 日韩一区二区在线观看| 国产福利精品一区二区| 亚洲一区二区三区四区在线观看| 日韩精品一区二区三区三区免费| 93久久精品日日躁夜夜躁欧美| 日本中文字幕一区二区视频| 国产精品日日摸夜夜摸av| 在线成人小视频| 成人激情午夜影院| 日韩av电影一区| 有坂深雪av一区二区精品| 国产性天天综合网| 欧美日韩一区二区在线观看视频| 国产精品99久久久久久久vr| 亚洲一区二区视频在线观看| 久久精品一区蜜桃臀影院| 91精品国产综合久久久蜜臀粉嫩| 成人av在线一区二区| 麻豆国产精品官网| 亚洲一二三级电影| 国产精品国产精品国产专区不片| 欧美一卡二卡三卡四卡| 在线精品视频一区二区| 国产一区二区三区精品视频| 日韩精品乱码av一区二区| 亚洲精品视频自拍| 国产精品女主播av| 精品电影一区二区| 777欧美精品| 在线亚洲免费视频| 成人教育av在线| 国产成人三级在线观看| 全部av―极品视觉盛宴亚洲| 亚洲综合无码一区二区| 中文字幕中文字幕一区二区| 精品成a人在线观看| 欧美一区二区成人| 91精品视频网| 717成人午夜免费福利电影| 日本乱人伦aⅴ精品| 99久久婷婷国产精品综合| 国产原创一区二区三区| 久久精品国产999大香线蕉| 图片区小说区国产精品视频| 夜夜嗨av一区二区三区网页 | 亚洲123区在线观看| 亚洲精品成a人| 亚洲欧美日韩一区| 亚洲天堂av老司机|