视频动态车牌识别matlab,在网上下载了一个matlab的车牌识别,怎么将识别黄色车牌改成识别蓝色车牌,大神求解...

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

function [y_image] = extract_yellow_region(image);

% extract_yellow_region: Determines the yellow regions in the picture using

% the CIE-XYZ color system, and returns a black and white picture which is

% set on the yellow regions only.

% Define the lines in CIE-XYZ space, use to determine yellow color

lower_A = 0.87; lower_B = 0.04;

upper_A = 1.5 ; upper_B = -0.125;

% Convert 8-bit format of org_pic pixels to double format

pic = double(image)+1;

pic = pic.*1.6;

% Conversion from RGB709 to CIE-XYZ

x = ( pic(:,:,1).*0.412453 + pic(:,:,2).*0.35758 + pic(:,:,3).* 0.180423);

y = ( pic(:,:,1).*0.212671 + pic(:,:,2).*0.715160 + pic(:,:,3).* 0.072169);

z = ( pic(:,:,1).*0.019334 + pic(:,:,2).*0.119193 + pic(:,:,3).*0.950227);

sum = x + y + z;

x_bar = x./sum;

y_bar = y./sum;

% Define yellow color in CIE-XYZ space

x_sum_conds = ( ((x_bar > 0.34) & (sum > 400) & (sum < 500) ) | ((x_bar > 0.37) & (sum > 200) & (sum < 500)) );

xy_conds = ( (y_bar > 0.35) & (y_bar < 0.5) & (y_bar > (lower_A*x_bar + lower_B)) & (y_bar < (upper_A*x_bar + upper_B)) );

y_image = (x_sum_conds & xy_conds);

return; 这段代码怎么提取黄色改成提取蓝色

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值