이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
Why do I receive this error message?
조회 수: 4 (최근 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!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 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 (한국어)