shashank bhushan
shashank bhushan

Reputation: 155

Error while using Matlab System commnad

i am extracting dense video feature. The problem i am facing is that when i run in linux terminal.

./release/DenseTrackStab /home/shashank/Documents/MATLAB/stip_fisher-master/UCF50/BaseballPitch/v_BaseballPitch_g08_c07.avi | tee > /home/shashank/Documents/MATLAB/stip_fisher-master/data/ucf-50/BaseballPitch/v_BaseballPitch_g08_c07.stip

it works perfectly fine .

when i do same in matlab using system command

>> system('./release/DenseTrackStab /home/shashank/Documents/MATLAB/stip_fisher-master/UCF50/BaseballPitch/v_BaseballPitch_g08_c07.avi | tee > /home/shashank/Documents/MATLAB/stip_fisher-master/data/ucf-50/BaseballPitch/v_BaseballPitch_g08_c07.stip')

the result i get is Could not initialize capturing..

ans =

 0

Why is this happing i am not able to understand.

Upvotes: 0

Views: 109

Answers (1)

Reza Zolfaghari
Reza Zolfaghari

Reputation: 51

I get same error and solved this problem by adding OpenCV include and library path before my command. For example, in my case I did as follows:

system('PATH=/usr/include/opencv2/:$PATH LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH /misc/lmbraid17/zolfagha/optical_flow/twinFlow /misc/lmbraid17/zolfagha/UCF50/BaseballPitch/v_BaseballPitch_g08_c07.avi -f 1 ...')

Best,

Upvotes: 1

Related Questions