現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
Why do I receive this error message?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello.
I tried to run the code via this link https://github.com/yifanw90/Zeyde_superes and I get errors below, can anyone help resolve this.
% Training [0 x 1000] dictionary on 0 vectors using K-SVD
Error using ksvd (line 386)
Number of training signals is smaller than number of atoms to train
Error in learn_dict (line 49)
[conf.dict_lores, gamma] = ksvd(ksvd_conf); % , '');
Error in Example (line 25)
conf = learn_dict(conf, load_images(...
>>
18 件のコメント
Chidiebere Ike
2018 年 11 月 10 日
編集済み: Walter Roberson
2018 年 11 月 10 日
Thanks Walter for your response. I observed that too. I entered some images in Data (Test and Training) and still got errors below. I have attached a link for the same file with images in Data. What could be the reason for this error? Please guide me.
Training [0 x 1000] dictionary on 0 vectors using K-SVD
Error using ksvd (line 386)
Number of training signals is smaller than number of atoms to train
Error in learn_dict (line 49)
[conf.dict_lores, gamma] = ksvd(ksvd_conf); % , '');
Error in Example (line 25)
conf = learn_dict(conf, load_images(...
Thank you
Walter Roberson
2018 年 11 月 10 日
The code uses MS Windows folder separator. I had to change from \ to / to get it to work on my Mac.
conf = learn_dict(conf, load_images(...
glob('./CVPR08-SR/Data/Training', '*.bmp') ...
));
I also had to change the addpath to
addpath(fullfile(p, 'ksvdbox')); % K-SVD dictionary training algorithm
addpath(fullfile(p, 'ompbox')); % Orthogonal Matching Pursuit algorithm
Chidiebere Ike
2018 年 11 月 10 日
Thanks Walter. I made all corrections as instructed and still got the errors stated below. I ran exactly the same Drive code I sent earlier. This is what I did:
if true
% p = pwd;
addpath(fullfile(p, 'ksvdbox')); % K-SVD dictionary training algorithm
addpath(fullfile(p, 'ompbox')); % Orthogonal Matching Pursuit algorithm
% addpath(fullfile(p, '../CVPR08-SR'));
mat_file = 'conf.mat';
%%Simulation settings
conf.scale = 3; % scale-up factor
conf.level = 1; % # of scale-ups to perform
conf.window = [3 3]; % low-res. window size
conf.border = [1 1]; % border of the image (to ignore)
% High-pass filters for feature extraction (defined for upsampled low-res.)
conf.upsample_factor = 3; % upsample low-res. into mid-res.
O = zeros(1, conf.upsample_factor-1);
G = [1 O -1]; % Gradient
L = [1 O -2 O 1]/2; % Laplacian
conf.filters = {G, G.', L, L.'}; % 2D versions
conf.interpolate_kernel = 'bicubic';
conf.overlap = [1 1]; % partial overlap (for faster training)
conf = learn_dict(conf, load_images(...
glob('./CVPR08-SR/Data/Training', '*.bmp')));
conf.overlap = conf.window - [1 1]; % full overlap scheme (for better reconstruction)
save(mat_file, 'conf');
end
This is the error I got:
if true
% code>> clear all
>> Example
Training [30 x 1000] dictionary on 104788 vectors using K-SVD
Attempt to execute SCRIPT ompmex as a function:
/Users/ikechidiebere/Downloads/Zeyde_superes-master/ompbox/private/ompmex.m
Error in omp (line 162)
gamma = ompmex(D,X,DtX,G,T,sparse_gamma,msgdelta,profile);
Error in ksvd>sparsecode (line 562)
Gamma = ompfunc(D,data,G,thresh,ompparams{:});
Error in ksvd (line 436)
Gamma = sparsecode(data,D,XtX,G,thresh);
Error in learn_dict (line 49)
[conf.dict_lores, gamma] = ksvd(ksvd_conf); % , '');
Error in Example (line 25)
conf = learn_dict(conf, load_images(...
>> end
What could be the reason for this?
Thank you
Walter Roberson
2018 年 11 月 10 日
編集済み: Walter Roberson
2018 年 11 月 10 日
here = pwd;
cd /Users/ikechidiebere/Downloads/Zeyde_superes-master/ompbox/private
make
cd /Users/ikechidiebere/Downloads/Zeyde_superes-master/ksvdbox/private
make
cd(here);
Example
Chidiebere Ike
2018 年 11 月 10 日
Thanks for your response. I am sorry I don't understand your message sir. Can you please make it clear. Thanks
Walter Roberson
2018 年 11 月 10 日
That is a sequence of commands you should execute.
The problem you have is that ompbox and ksvdbox have code that needs to be compiled; you have to cd to the appropriate directory and use the command "make" to compile the code.
Chidiebere Ike
2018 年 11 月 11 日
編集済み: Chidiebere Ike
2018 年 11 月 11 日
I got this error.
if true
% >> here = pwd;
>> cd /Users/ikechidiebere/Downloads/Zeyde_superes-master/ompbox/private
>> make
Compiling ompmex...
Warning: Xcode appears to be installed, but it has not been configured. Run "osascript -e 'do
shell script "xcode-select -switch /Applications/Xcode.app" with administrator privileges'" to
configure Xcode. You must be an administrator of this computer to complete this action.
> In make (line 37)
Error using mex
No supported compiler or SDK was found. For options, visit
https://www.mathworks.com/support/compilers.
Error in make (line 37)
mex('ompmex.c', ompsources{:},compile_params{:});
0:92: execution error: xcode-select: error: invalid developer directory '/Applications/Xcode.app' (1)
ans =
1
>> cd /Users/ikechidiebere/Downloads/Zeyde_superes-master/ksvdbox/private
>> make
Compiling addtocols.c...
Warning: Xcode appears to be installed, but it has not been configured. Run "osascript -e 'do
shell script "xcode-select -switch /Applications/Xcode.app" with administrator privileges'" to
configure Xcode. You must be an administrator of this computer to complete this action.
> In make (line 39)
Error using mex
No supported compiler or SDK was found. For options, visit
https://www.mathworks.com/support/compilers.
Error in make (line 39)
mex(sourcefiles{i}{:},compile_params{:});
0:92: execution error: xcode-select: error: invalid developer directory '/Applications/Xcode.app' (1)
ans =
1
>> cd(here);
>> Example
Warning: Name is nonexistent or not a directory:
/Users/ikechidiebere/Downloads/Zeyde_superes-master/ompbox/private/ksvdbox
> In path (line 109)
In addpath (line 94)
In Example (line 5)
Warning: Name is nonexistent or not a directory:
/Users/ikechidiebere/Downloads/Zeyde_superes-master/ompbox/private/ompbox
> In path (line 109)
In addpath (line 94)
In Example (line 6)
Training [0 x 1000] dictionary on 0 vectors using K-SVD
Error using ksvd (line 386)
Number of training signals is smaller than number of atoms to train
Error in learn_dict (line 49)
[conf.dict_lores, gamma] = ksvd(ksvd_conf); % , '');
Error in Example (line 25)
conf = learn_dict(conf, load_images(...
>>
end
What could be the issue here? Please guide me
Thanks
Chidiebere Ike
2018 年 11 月 11 日
編集済み: Chidiebere Ike
2018 年 11 月 11 日
I am using macOS Mojave, version 10.14.1 and my version of Matlab is Matlab_R2017b
Chidiebere Ike
2018 年 11 月 11 日
Please, which of these version of Matlab supports my operating system?
MATLAB 9.4(R2018a) or MATLAB 9.5(R2018b)
Thanks
Chidiebere Ike
2018 年 11 月 11 日
編集済み: Chidiebere Ike
2018 年 11 月 11 日
I have successfully compiled the ompbox and ksvdbox on 2017b Matlab version using Xcode 10 (new release). I still have errors stated below:
if true
% >> Error using imwrite (line 467)
Unable to open file "Set5/results/baby_GT[1-Original].bmp" for writing. You might not
have write permission.
Error in Example (line 57)
imwrite(result(:, :, j), conf.results{i}{j});
>>
end
madhan ravi
2018 年 11 月 11 日
Unable to open file "Set5/results/baby_GT[1-Original].bmp" for writing. You might not have write permission .
Walter Roberson
2018 年 11 月 11 日
Directory Set5 or Set5/results might not exist relative to the directory of execution, or directory Set5/results might be one you do not have permission to write into.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)