Matlab throws error inside hdrvdp.m

253 views
Skip to first unread message

Abhijit Karnik

unread,
Apr 9, 2012, 3:15:00 PM4/9/12
to hdr...@googlegroups.com
Hi

I am trying to run the following code (checked with hdrvdp-2.1 and hdrvdp-2.1.1 both)

  T = double(imread( 'C:\HDR-VDP2\Test.JPG' ))/2^8; % images must be
%                                                  % normalized 0-1
  R = double(imread( 'C:\HDR-VDP2\Reference.JPG' ))/2^8;
%
%  % Compute pixels per degree for the viewing conditions
  ppd = hdrvdp_pix_per_deg( 23, [1920 1080], 0.8 );
%
%  % Run hdrvdp
  res1 = hdrvdp( T, R, 'sRGB-display', ppd );

I am getting an error:
Error: File: hdrvdp.m Line: 201 Column: 7
Expression or statement is incorrect--possibly unbalanced (, {, or [.

Error in ==> Script at 9
  res1 = hdrvdp( T, R, 'sRGB-display', ppd );

Is there something that I am missing here? I am using matlabPyrTools_1.4_fixed

Thanks.

Abe

Rafal

unread,
Apr 11, 2012, 5:21:16 AM4/11/12
to hdr...@googlegroups.com
Hi Abe,

On Monday, 9 April 2012 20:15:00 UTC+1, Abhijit Karnik wrote:
I am getting an error:
Error: File: hdrvdp.m Line: 201 Column: 7
Expression or statement is incorrect--possibly unbalanced (, {, or [.

Error in ==> Script at 9
  res1 = hdrvdp( T, R, 'sRGB-display', ppd );
 
The offending line should contain:

    [~, IMG_E] = load_spectral_resp( [metric_par.base_dir '/' metric_par.spectral_emission] )

which is the syntax that is not recognized in older versions of matlab. Please change it to:

    [tmp, IMG_E] = load_spectral_resp( [metric_par.base_dir '/' metric_par.spectral_emission] )

in this and a few other lines. 

The issue will be fixed in the next release.

Rafal

Abhijit Karnik

unread,
Apr 11, 2012, 11:30:39 AM4/11/12
to HDR VDP
Hi Rafal,

I just figured that out today morning. I was using R2009a.
One more location deep inside a FFT transform requires an edit.

Thank you for your time.

Regards,
Abe
Reply all
Reply to author
Forward
0 new messages