Detecting Traffic lights using machine learning

5 ビュー (過去 30 日間)
Shahrin Islam
Shahrin Islam 2018 年 10 月 19 日
コメント済み: Shahrin Islam 2018 年 10 月 19 日
Hello everyone. I am new matlab learner and working on a project to detect traffic lights using machine learning. In the first portion of my code i have this line "pkg load image". When i execute the code, matlab showing me error in this line and as a new learner i don't understand what is it. Please help me with this. here i am attaching the code below-
  1 件のコメント
Shahrin Islam
Shahrin Islam 2018 年 10 月 19 日
%% This script will detect traffic ligth's color %% in an infinitive loop. %% %% Author: Tomasz Ceszke 2017
%% ----------- init clear ; close all; more off pkg load image;
source('conf/settings.m'); source('lib/features.m'); source('lib/log_reg.m');
%% ----------- load learned factors load 'theta.mat';
%% ----------- settings live_image_path = strcat(datasource_path_prefix,'live/scene.png');
%% fprintf('Path to detect: %s \n\n',live_image_path); while 1 pause(1); try live_image = imread(live_image_path); catch disp('No image'); continue; end
X = zeros(1,numel(live_image));
X = reshape(double(rgb2gray(live_image)),1,[]);
if normalization
X = normalize(X,0);
end
[r h] = recognize(theta,X);
if r==1
color = 'GREEN';
else
color = 'RED';
end
fprintf('%s h(x)=%.2f\n',color,h)
end

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeAutomated Driving Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by