使用霍夫变换检测瞳孔的代码。即圆圈发现和瞳孔中心。

编程入门 行业动态 更新时间:2024-10-10 02:17:28
本文介绍了使用霍夫变换检测瞳孔的代码。即圆圈发现和瞳孔中心。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好,通过此代码,我能够找到图像的质心,即每当瞳孔位于中心时。但是当瞳孔在角落时,它会在巩膜部分给出质心。那么我怎样才能根据瞳孔移动质心。以及如何创建一个滑动窗口以在图像上移动它以找到最大的暗区即瞳孔。 清除所有; clc; Ia = imread('eye.jpg'); subplot(121); imshow(Ia); bw = im2bw(Ia,graythresh(getimage)); figure,imshow(bw); %Thresholding Ia_black = uint8(Ia(:,:,1)< 20&Ia(:,:,2)> 200&Ia(:,:,3)< 20); %Centroid [y1,x1] = find(Ia_black == 0); x1 = round(mean(x1)); y1 = round(mean(y1)); figure; imshow式(Ia);坚持; alpha(.5); plot(x1,y1,'r *');

Hello, with this code I am able to find the centroid of the image i.e. whenever the pupil is at the center. But when pupil is at the corner it is giving centroid on sclera part. so how can i move the centroid according to the pupil. And how to create a sliding window to move it on image to find the max dark area i.e. pupil. clear all;clc; Ia = imread('eye.jpg'); subplot(121);imshow(Ia); bw = im2bw(Ia, graythresh(getimage)); figure, imshow(bw); % Thresholding Ia_black = uint8(Ia(:,:,1)<20 & Ia(:,:,2)>200 & Ia(:,:,3)<20); % Centroid [y1,x1] = find(Ia_black==0); x1 = round(mean(x1)); y1 = round(mean(y1)); figure; imshow(Ia); hold on; alpha(.5); plot(x1,y1,'r*');

推荐答案

它不是那样的工作。 我们不为你工作。 如果你想要某人要写你的代码,你必须付钱 - 我建议你去Freelancer并在那里问。 但要注意:你得到你付出的代价。支付花生,买猴子。 It doesn't quite work like that. We do not do your work for you. If you want someone to write your code, you have to pay - I suggest you go to Freelancer and ask there. But be aware: you get what you pay for. Pay peanuts, get monkeys.

更多推荐

使用霍夫变换检测瞳孔的代码。即圆圈发现和瞳孔中心。

本文发布于:2023-11-29 10:57:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1646198.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:瞳孔   圆圈   霍夫   代码   发现

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!