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

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

?? ac_usage_mean.m

?? 主動輪廓模型(蛇模型)及應用MATLAB源碼
?? M
字號:
function ac_usage_mean
%ac_usage_mean: region competition of mean-based descriptors in grayscale
%   ac_usage_mean implements segmentation of a grayscale image into object and
%   background. Both the object and the background descriptors are based on the
%   mean intensities within their respective regions. Segmentation is performed
%   using a multi-scale approach with 3 levels.
%
%   A first window opens to select a file containing an image to be segmented.
%   It can be .mat file containing an image stored in a variable with any name
%   or it can be an image file 'imread' can read. If this window is cancelled,
%   then ac_usage_mean exists. (Three synthetic test images stored in a variable
%   'frame' are available in the directory 'usage' of the Active Contour toolbox
%   directory: files ac_frame1.mat, ac_frame2.mat, and ac_frame3.mat.) Then, a
%   list selection dialog box opens. It offers 4 possible active contour
%   initializations: (1) manual = graphical initialization with gi_shape (only
%   single active contours can be entered this way), (2) islands = a blind,
%   "uniform", random initialization (this option is time consuming if the image
%   to be segmented is large.), (3) circles = a blind, "uniform", deterministic
%   initialization, and (4) file = a .mat file containing an active contour
%   stored in a variable with any name. If no active contour is entered, then
%   ac_usage_mean exists.
%
%   The energy and velocity amplitude functions are declared as subfunctions of
%   ac_usage_mean. It has been done to make ac_usage_mean self-contained for
%   presentation purposes. However, these functions can be declared as normal
%   functions.
%
%See also gi_shape, acontour, imread.
%
%Active Contour Toolbox by Eric Debreuve
%Last update: July 5, 2006

   title = 'Mean in grayscale';

   %%parameters
   %active contour
   segm_prm.resolutions       = [4 8 5];
   segm_prm.pyramid           = @s_laplacian_pyramid;
   segm_prm.iterations        = 200;

   acontour_prm.amplitudes    = -10;

   %interface
   interface_prm.acontour     = @gi_acontour;
   interface_prm.interruption = @gi_acontour;

   %%data
   [filename, pathname] = uigetfile('*.*', 'Image to be segmented');
   if filename == 0, return, end
   if strcmp(filename((end-3):end), '.mat')
      content = load([pathname filesep filename]);
      variable_name = fieldnames(content);
      frame = content.(variable_name{1});
   else
      frame = double(imread([pathname filesep filename]));
   end
   if size(frame, 3) > 1
      %energy and velocity amplitude are written for grayscale images, not for
      %color.
      frame = frame(:,:,1);
   end

   %%initial segmentation
   %instantiation
   [selection_idx, valid_selection] = listdlg('Name', 'Initialization', ...
      'ListString', {'manual', 'islands', 'circles', 'file'}, 'SelectionMode', 'single');
   if valid_selection == 0, return, end
   switch selection_idx
      case 1
         acontour = gi_shape(frame, 'forced closed', 'forced positive', 'forced spline');

      case 2
         random = rand(size(frame));
         acontour = ac_isocontour(random, 1.05 * mean(random(:)), 1, ...
            segm_prm.resolutions(1), {1 0}, fspecial('gaussian', 6, 2));
         clear random

      case 3
         seeds = zeros(size(frame));
         interval = round(size(frame) / 8);
         first = ceil(interval / 2) + 1;
         seeds(first(1):interval(1):end,first(2):interval(2):end) = 1;
         distance = bwdist(seeds);
         acontour = ac_isocontour(distance, min(interval)/3, 1, ...
            segm_prm.resolutions(1), {1 max(distance(:))});
         clear seeds interval first distance

      case 4
         [filename, pathname] = uigetfile('*.*', 'File of initial active contour');
         if filename == 0, return, end
         content = load([pathname filesep filename]);
         variable_name = fieldnames(content);
         acontour = content.(variable_name{1});
   end
   if isempty(acontour), return, end

   %display
   gi_acontour('initialization', title, frame, acontour)
   drawnow

   %%segmentation process
   [segm_context, algo_context] = ac_segmentation(...
      frame, acontour, @s_energy, @s_amplitude, ...
      segm_prm, acontour_prm, interface_prm);

   %%final segmentation
   algo_context
   segm_context
   gi_acontour('result', frame, acontour, segm_context.acontour)



function [energy, o_global_prm] = s_energy(segm_context, algo_context, user_data)
%s_energy computes the current segmentation energy as:
%e = \int_maskofobject (f(x) - meanofobject)^2 dx ...
%  + \int_maskofbackground (f(x) - meanofbackground)^2 dx
%where f is the frame to be segmented.
%meanofobject and meanofbackground are auxiliary variables also involved in the
%velocity amplitude expression.

   %in a multiscale approach (as opposed to monoscale-multiresolution and
   %monoscale-monoresolution), the scaled data are passed as the field
   %scaled_data of segm_context (user_data always contains the original data).
   %the following is a trick to keep on using the name user_data in the
   %subsequent computation.
   if isfield(segm_context, 'scaled_data')
      user_data = segm_context.scaled_data;
   end

   mask_of_object = ac_mask(segm_context.acontour, size(user_data));
   area_of_object = sum(mask_of_object(:));
   mean_of_object = sum(sum(user_data .* mask_of_object)) / area_of_object;

   mean_of_background = sum(sum(user_data .* (1 - mask_of_object))) / (numel(user_data) - area_of_object);

   %auxiliary variables useful for the computation of the velocity amplitude, to
   %be passed to the velocity amplitude function by ac_segmentation as new
   %fields of segm_context.
   if nargout > 1
      o_global_prm.mean_of_object     = mean_of_object;
      o_global_prm.mean_of_background = mean_of_background;
   end

   energy = sum(sum((user_data - mean_of_background - ...
      (mean_of_object - mean_of_background) * mask_of_object).^2));



function amplitude = s_amplitude(samples, segm_context, algo_context, user_data)
%s_amplitude computes the discrete active contour velocity amplitude as:
%a(sample) = (f(sample) - meanofobject)^2 - (f(sample) - meanofbackground)^2
%meanofobject and meanofbackground come from s_energy.

   %see note on scaled data in s_energy.
   if isfield(segm_context, 'scaled_data')
      user_data = segm_context.scaled_data;
   end

   mean_of_object     = segm_context.mean_of_object;
   mean_of_background = segm_context.mean_of_background;

   frame_at_samples = interp2(user_data, samples(2,:), samples(1,:));

   amplitude = (mean_of_object^2 - mean_of_background^2) - ...
      (2 * (mean_of_object - mean_of_background)) * frame_at_samples;



function [smaller, framesize] = s_laplacian_pyramid(frame, level)
%s_laplacian_pyramid computes the scale 'level' of frame 'frame' as described
%in: Peter J. Burt and Edward H. Adelson, "The laplacian pyramid as a compact
%image code", IEEE Transactions on Communications, Vol. COM-3l, No. 4, April
%1983.
%if level is equal to zero, the original frame is returned. otherwise the
%processing filtering+subsampling_by_2 is repeated 'level' times. framesize is
%the size of the output of the last processing, or size(frame) if level is equal
%to zero.

   persistent filter

   if isempty(filter)
      filter = zeros(1,5);
      filter(3) = 0.6;
      filter([2 4]) = 0.25;
      filter([1 5]) = 0.25 - filter(3)/2;
   end

   smaller = frame;

   for current_level = 1:level
      if min(size(smaller)) < 100
         break
      end
      smaller = conv2(smaller, filter, 'same');
      smaller = conv2(smaller, transpose(filter), 'same');
      smaller(1:2:end,:) = [];
      smaller(:,1:2:end) = [];
   end

   framesize = size(smaller);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av中文字幕一区二区| 国产人成亚洲第一网站在线播放 | 国产精品久久久久影院色老大| 678五月天丁香亚洲综合网| 在线观看国产一区二区| 97成人超碰视| 91黄色免费看| 精品视频一区三区九区| 欧美欧美午夜aⅴ在线观看| 欧美性大战久久久| 3d动漫精品啪啪1区2区免费| 欧美日韩电影在线播放| 欧美日韩高清一区二区三区| 欧美日韩国产高清一区二区三区 | 日韩av一区二| 美女精品一区二区| 精品夜夜嗨av一区二区三区| 久久99精品久久久| 国产一区999| 成人免费毛片高清视频| 99国内精品久久| 91国内精品野花午夜精品 | 精品视频999| 7799精品视频| 精品粉嫩aⅴ一区二区三区四区| 欧美精品一区二区三区蜜臀| 国产日韩欧美亚洲| 亚洲伦在线观看| 日韩国产一二三区| 国产高清视频一区| 色综合天天性综合| 欧美日韩三级在线| 精品国产自在久精品国产| 国产亚洲欧美激情| 亚洲欧美成aⅴ人在线观看| 亚洲小说欧美激情另类| 欧美aaa在线| eeuss鲁片一区二区三区在线观看| 日本韩国欧美一区二区三区| 欧美日本免费一区二区三区| 久久影院视频免费| 一区二区三区**美女毛片| 青青草原综合久久大伊人精品 | 国产精品对白交换视频| 性做久久久久久免费观看| 国产一区美女在线| 欧美日韩二区三区| 中文字幕日韩一区| 麻豆精品蜜桃视频网站| 91美女片黄在线| 久久亚洲免费视频| 亚洲国产一区二区三区| 成人精品视频一区二区三区 | 精品美女在线播放| 亚洲欧美怡红院| 国产一区二区精品久久91| 欧美午夜精品久久久久久超碰 | 色一区在线观看| 久久久噜噜噜久久中文字幕色伊伊| 亚洲一区二区五区| 国产v综合v亚洲欧| 精品国产乱码91久久久久久网站| 一区二区三区免费| 91在线视频播放地址| 久久久亚洲午夜电影| 免费观看久久久4p| 欧美日韩免费高清一区色橹橹| 国产精品亲子伦对白| 国产麻豆精品久久一二三| 欧美高清视频在线高清观看mv色露露十八| 国产日韩欧美亚洲| 国产成a人亚洲| 国产无人区一区二区三区| 久久国产精品99久久久久久老狼| 欧美日本一道本| 亚洲午夜久久久久中文字幕久| 色哟哟欧美精品| 美女视频黄频大全不卡视频在线播放| 国产成人啪免费观看软件| 精品国产乱码久久久久久免费| 视频一区在线播放| 欧美精品乱码久久久久久| 亚洲成人先锋电影| 91精品国产一区二区三区 | 欧美日韩国产免费| 视频一区欧美精品| 欧美一二三四区在线| 日韩一区精品视频| 欧美成人猛片aaaaaaa| 久久精品99国产国产精| 精品国产一区二区在线观看| 国产精品69久久久久水密桃| 久久亚区不卡日本| 成人自拍视频在线| 国产精品大尺度| 91官网在线免费观看| 午夜国产精品影院在线观看| 91.com在线观看| 久久国产免费看| 中文字幕av一区二区三区免费看 | 亚洲精品国产无套在线观| 在线观看一区不卡| 日日骚欧美日韩| 精品福利一区二区三区 | 国产精品区一区二区三区| 成人午夜激情影院| 亚洲午夜av在线| 精品少妇一区二区三区在线播放| 极品少妇xxxx偷拍精品少妇| 中文在线免费一区三区高中清不卡| 99国产欧美另类久久久精品| 国产精品一区二区久久精品爱涩| 国产精品成人免费在线| 欧美日韩免费观看一区二区三区 | 制服丝袜中文字幕一区| 国内久久婷婷综合| 亚洲视频一二三区| 日韩亚洲欧美一区| 99免费精品在线观看| 日本免费在线视频不卡一不卡二| 精品成人在线观看| 色嗨嗨av一区二区三区| 激情丁香综合五月| 亚洲一区二区三区在线| 久久九九99视频| 欧美日韩高清一区二区不卡| 国产成人av电影在线| 亚洲第一av色| 国产精品对白交换视频| 欧美成人vr18sexvr| 欧美中文字幕亚洲一区二区va在线| 激情图片小说一区| 图片区小说区国产精品视频| 欧美激情在线看| 精品精品国产高清a毛片牛牛 | 在线免费观看成人短视频| 国产在线精品一区二区夜色| 亚洲一区二区三区视频在线播放| 久久精品亚洲麻豆av一区二区 | 精品国产第一区二区三区观看体验| av不卡在线播放| 国产真实乱对白精彩久久| 国产在线精品免费| 免费三级欧美电影| 亚洲bdsm女犯bdsm网站| 亚洲欧美日韩国产手机在线| 国产欧美日韩麻豆91| 精品国产伦一区二区三区观看体验 | 日本亚洲电影天堂| 亚洲一区二区三区激情| 亚洲三级视频在线观看| 国产精品福利影院| 国产精品第一页第二页第三页| 26uuu色噜噜精品一区二区| 日韩欧美亚洲国产精品字幕久久久| 在线日韩一区二区| 91福利区一区二区三区| 色婷婷狠狠综合| 色999日韩国产欧美一区二区| 91在线观看美女| 色综合久久久久综合体| 一本到高清视频免费精品| 91影院在线免费观看| 色婷婷综合久久久| 在线观看亚洲成人| 欧美日韩精品是欧美日韩精品| 欧美日本在线视频| 欧美一级免费大片| 精品国产一区久久| 国产精品热久久久久夜色精品三区| 国产精品免费视频一区| 国产精品麻豆网站| 亚洲综合视频网| 偷偷要91色婷婷| 国产一区在线视频| 粉嫩aⅴ一区二区三区四区五区| 成人午夜短视频| 色老综合老女人久久久| 7777精品伊人久久久大香线蕉| 日韩色视频在线观看| 久久精品视频网| 一区二区三区免费看视频| 日韩**一区毛片| 国产传媒日韩欧美成人| 一本色道亚洲精品aⅴ| 欧美疯狂做受xxxx富婆| 久久久久国产精品人| 亚洲免费电影在线| 美女一区二区视频| www.亚洲免费av| 制服丝袜日韩国产| 日本一区二区三区四区| 亚洲自拍偷拍网站| 国产永久精品大片wwwapp| 91免费国产在线| 欧美变态tickling挠脚心| 中文字幕一区二区三区在线播放 | 欧美精品自拍偷拍| 欧美激情中文字幕一区二区| 亚洲一区二区三区中文字幕在线|