freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于pca算法的人臉識別系統(tǒng)設計畢業(yè)論文-資料下載頁

2025-07-01 14:20本頁面

【導讀】師的指導下進行的研究工作及取得的成果。盡我所知,除文中特別加。而使用過的材料。對本研究提供過幫助和做出過貢獻的個人或集體,均已在文中作了明確的說明并表示了謝意。

  

【正文】 t, eventdata, handles, varargin) % This function has no output args, see OutputF. % hObject handle to figure % eventdata reserved to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin mand line arguments to facerecg (see VARARGIN) % Choose default mand line output for facerecg = hObject。 set(gcf,39。name39。,39。人臉識別系統(tǒng) 39。) 21 % Update handles structure guidata(hObject, handles)。 % UIWAIT makes facerecg wait for user response (see UIRESUME) % uiwait()。 % Outputs from this function are returned to the mand line. function varargout = facerecg_OutputF(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT)。 % hObject handle to figure % eventdata reserved to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Get default mand line output from handles structure varargout{1} = 。 % Executes on button press in pushbuttontrain. function pushbuttontrain_Callback(hObject, eventdata, handles) % hObject handle to pushbuttontrain (see GCBO) 22 % eventdata reserved to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) report = sprintf(39。正在訓練樣本,請稍等。 39。)。 set(,39。String39。,report)。 drawnow mytrain。%調(diào)用訓練的 m 文件 report = sprintf(39。PCA 模型已經(jīng)生成,訓練完畢,結(jié)果保存在 中 39。)。 set(,39。String39。,report)。 % Executes on button press in pushbuttonloadimg. function pushbuttonloadimg_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonloadimg (see GCBO) % eventdata reserved to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) %文件篩選框 選擇圖片 [filename,pathname] = uigetfile({39。*.jpg。*.bmp。*.tif。*.png。*.gif39。,39。All Image Files39。},39。請選擇一張圖片 39。)。 23 if filename == 0%如果沒有選擇,直接返回即可 return。 end strfullname = strcat(pathname,filename)。%取得圖像文件全名 I = imread(strfullname)。%讀取圖片 axes() imshow(I)。%顯示圖片 title(39。測試圖像 39。) = I。%保存在 handles 內(nèi),以便被其他 函數(shù)調(diào)用 report = sprintf(39。成功打開要測試的圖像 :%s。 39。,strfullname)。 set(,39。String39。,report)。 % Update handles structure guidata(hObject, handles)。 % Executes on button press in pushbuttonrecg. function pushbuttonrecg_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonrecg (see GCBO) 24 % eventdata reserved to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) personnames = {39。 39。,39。 39。,39。 39。,39。 39。,39。 39。,39。楊洋 39。}。 if ~isfield(handles,39。I39。)%判 斷是否載入了圖片 report = sprintf(39。請先載入要測試的圖像 !39。)。%提示信息 set(,39。String39。,report)。 msgbox(report)。 return。 end if ~exist(39。39。)%是否訓練了 report = 39。你還未訓練樣本,請先訓練 !39。 msgbox(report,39。提示 39。)。 set(,39。String39。,report)。 return end I = 。 load trainresult %裝載訓練結(jié)果 25 goalpixnum = goalsize(1)*goalsize(2)。%圖片中的像素個數(shù), goalpixnum [M,N,color] = size(I)。%獲取圖片的大小,以及色彩類型 if color == 3%如果是彩色圖片 I1 = rgb2gray(I)。%轉(zhuǎn)為灰度圖片 end % I1= imadjust(I1,stretchlim(I1))。%灰 度變換,圖像增強 if (isequal([M,N],goalsize) == 0)%如果不是 64*64 的 I1 = imresize(I1,goalsize)。%轉(zhuǎn)為固定的 64*64 的 end I1 = reshape(I1, goalpixnum, 1)。%調(diào)整圖片矩陣樣式,轉(zhuǎn)為 4096 行 1 列的矩陣 I1 = double(I1)。 set(,39。string39。,39。測試數(shù)據(jù)降維 ......39。) testfeatures = UU39。*I1。%測試樣本的 PCA 特征 矩陣 TRAINNUM = size(samplesfeatures,2)。%訓練樣本的個數(shù) dd = []。%存放距離 for j =1:TRAINNUM 26 tempfeature = samplesfeatures(:,j)。%取出某個樣本的 PCA 特征 d = dist(testfeatures,tempfeature)。%計算特征之間的距離 dd = [dd,d]。 end [minvalue,minindex] = min(dd)。%minindex 距離的最小值所在的位置 minvalue if minvalue =650 str = sprintf(39。未識別出此人。 39。)。 set(,39。string39。,str)。 axes()。 cla else classlabel = ceil(minindex/trainnumpertype)。%測出的類別序號 picindex = mod(minindex,trainnumpertype)。%和這類中第幾 個最接近 27 if picindex == 0 picindex = trainnumpertype。%圖片序列號 end str = sprintf(39。識別完成 ,識別此照片為第 %d 人 :%s。 39。,classlabel,personnames{classlabel})。 set(,39。string39。,str)。 drawnow axes()。 fn = sprintf(39。人臉庫 \\%02d\\s%39。,classlabel,picindex)。%識別的那個人的 第一張照片拿出來當做識別的結(jié)果 imshow(imread(fn))。 strtitle = sprintf(39。識別結(jié)果第 %d 人 :%s39。,classlabel,personnames{classlabel})。 title(strtitle) end % Executes on button press in pushbuttonquit. function pushbuttonquit_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonquit (see GCBO) % eventdata reserved to be defined in a future version of MATLAB 28 % handles structure with handles and user data (see GUIDATA) close
點擊復制文檔內(nèi)容
研究報告相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1