pkg load image won't load
    12 ビュー (過去 30 日間)
  
       古いコメントを表示
    
Hello, 
I'm doing some coding, especially code taught in Udacity Introduction to computer vision.
I got a Matlab licence from University, and decided to coppy the code and apply it to my own Images, here's the code:
pkg load Image; % AFTER function definition
 img = imread('me copy.jpg');
imshow(img)
%%Add salt & pepper noise
noisy_img = imnoise(img, 'salt & pepper', 0.02);
imshow(noisy_img);
%%Apply a media filter. edge preservation
median_filtered = medfilt2(noisy_img);
imshow(median_filtered);
------------------------------------------------
And I get this error:
"""
Undefined function or variable 'pkg'.
Error in median (line 1)
pkg load Image; % AFTER function definition
"""
I already checked if I have the Image processing toolbox with function ver, and also have the licence.
How do i solve this, thanks.
0 件のコメント
回答 (1 件)
  Harshit Jain
      
 2019 年 3 月 4 日
        You can't add packages like this in MATLAB. This answer will help you in that. Just drop the first line and your code just works fine.
0 件のコメント
参考
カテゴリ
				Help Center および File Exchange で Computer Vision with Simulink についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!