Error while using Matlab System commnad - matlab

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.

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,

Related

GRIB1 to GRIB2 eccodes conversion failing due to paramId = 0

So what I am trying is converting a GRIB1 file to GRIB2 containing mostly wind data.
Usually you can just change the edition to 2 and the eccodes lib does everything else.
Now the issue is that my GRIB1 file has only paramId=0 and shortName=unknown messages.
What the hell am I supposed to do? When I load it into a viewer (e.g. PredictWind Offshore) it displays just fine. Any ides on how I can convert this to GRIB2 without knowing the messages? Am I missing something?
What I already tried:
❯ grib_set -s edition=2 e1.grib e2.grib
ECCODES ERROR : concept: no match for paramId=0
ECCODES ERROR : Please check the Parameter Database 'https://apps.ecmwf.int/codes/grib/param-db/?id=0'
ECCODES ERROR : concept: input handle edition=2
ECCODES ERROR : grib_set_values[0] edition (type=long) failed: Concept no match
What my GRIB1 (e1.grib) looks like:
❯ grib_dump e1.grib | egrep 'paramId|shortName'
...
shortName = unknown;
paramId = 0;
...
❯ grib_dump dsv1.grib | egrep 'paramId' | wc -l
679 # all unknown and 0
Edit:
For future readers:
I ended up not using eccodes at all. My solution now involves using PyNIO which worked great for me. It is able to read GRIB1.
For further info contact me directly.

Trying to start a vncserver that points to a custom xstartup

I'm using TigerVNC, trying to point to specific xstartup because I will need several unique startups for a given user. This is what I'm trying:
vncserver :5 -name "MyServer" -geometry 600x320 -depth 24 -AlwaysShared -fp /usr/share/X11/fonts/misc,/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/100dpi -IdleTimeout 0 -SecurityTypes VncAuth -rfbauth /home/frogger123/.vnc/passwd -xstartup /home/frogger123/.vnc/mystartup
I am consistently getting
Unrecognized option: -xstartup
The docs on the TigerVNC page list this as a valid option. What am I doing wrong? Thanks
edit:From the manual :
vncserver [:display#] [−name desktop-name] [−geometry widthxheight] [−depth depth] [−pixelformat format] [−fp font-path] [−fg] [−autokill] [−noxstartup] [−xstartup script] [Xvnc-options...]
−xstartup script
Run a custom startup script, instead of %HOME/.vnc/xstartup, after launching Xvnc. This is useful to run full-screen applications.
I was using the wrong version of TigerVNC

Google deepmind q learning setup

Hi I'm trying to run the deepmind q learning software on my mac. I believe I have all the necessary libraries to run the network. I don't understand however to actually run the "run_cpu" or "run_gpu" command. Ive tried running it in terminal with the file followed by the game name breakout. I.e. "./run_gpu breakout". The github page with the code says that all you need to do is copy the rom from the roms folder but I'm not quite sure what that means/how to do it. The repository can be found here: https://github.com/kuz/DeepMind-Atari-Deep-Q-Learner
I'm sure I'm missing something really really simple here. Here's the terminal print out:
Els-MacBook-Air:DeepMind-Atari-Deep-Q-Learner-master elcapitan$ ./run_gpu breakout
-framework alewrap -game_path /Users/elcapitan/Desktop/DeepMind-Atari-
Deep-Q-Learner-master/roms/ -name DQN3_0_1_breakout_FULL_Y -env breakout -
env_params useRGB=true -agent NeuralQLearner -agent_params
lr=0.00025,ep=1,ep_end=0.1,ep_endt=replay_memory,discount=0.99,hist_len=4,learn_start=50000,replay_memory=1000000,update_freq=4,n_replay=1,network="co
nvnet_atari3",preproc="net_downsample_2x_full_y",state_dim=7056,minibatch_s
ize=32,rescale_r=1,ncols=1,bufferSize=512,valid_size=500,target_q=10000,cli
p_delta=1,min_reward=-1,max_reward=1 -steps 50000000 -eval_freq 250000 -
eval_steps 125000 -prog_freq 10000 -save_freq 125000 -actrep 4 -gpu 0 -
random_starts 30 -pool_frms type="max",size=2 -seed 1 -threads 4
./run_gpu: line 46: qlua: command not found
Sorry if this sounds uber dumb. Anyway I'd appreciate a solution if you have one. Thanks!
You need to install qlua, try
sudo luarocks install qtlua

EclipseFP issues with Hoogle

Installed EclipseFP, looks without any observable issues. However, when I start Eclipse, I get this:
Whether I click yes or no, the same thing happens on next restart.
Also, in the Hoogle view, I see this:
even though I see the databases seemingly OK in workspace\.metadata\.plugins\net.sf.eclipsefp.haskell.browser\scion-browser-0.2-dbs:
hackage.db 123.71 MB 31.10.2014 09:42:18 Data Base File A
local.db 3.06 MB 31.10.2014 10:20:53 Data Base File A
In the scion-browser console, I have this on startup:
>> {"rebuild":true,"filepath":"C:\\eclipse\\workspace\\.metadata\\.plugins\\net.sf.eclipsefp.haskell.browser\\scion-browser-0.2-dbs\\local.db","command":"load-local-db"}
Local database loaded
"ok"
>> {"module":"","command":"get-modules","db":"_all"}
>> {"rebuild":false,"filepath":"C:\\eclipse\\workspace\\.metadata\\.plugins\\net.sf.eclipsefp.haskell.browser\\scion-browser-0.2-dbs\\hackage.db","command":"load-hackage-db"}
Hackage databas"ok"
e loaded
>> {"module":"Prelude","command":"get-declarations","db":"_all"}
>> {"path":"C:\\eclipse\\workspace\\.metadata\\.plugins\\net.sf.eclipsefp.haskell.ui\\sandbox\\.cabal-sandbox\\bin\\hoogle.exe","command":"extra-hoogle-path"}
"ok"
>> {"command":"hoogle-check"}
C:\eclipse\workspace\.metadata\.plugins\net.sf.eclipsefp.haskell.ui\sandbox\.cabal-sandbox\bin\hoogle.exe
"Error"
Looks like hoogle is not working from the command line either:
C:\>cd C:\eclipse\workspace\.metadata\.plugins\net.sf.eclipsefp.haskell.ui\sandbox\.cabal-sandbox\bin\
C:\eclipse\workspace\.metadata\.plugins\net.sf.eclipsefp.haskell.ui\sandbox\.cabal-sandbox\bin>hoogle fmap
Could not find some databases: default
Searching in:
.
C:\eclipse\workspace\.metadata\.plugins\net.sf.eclipsefp.haskell.ui\sandbox\.cabal-sandbox\x86_64-windows-ghc-7.8.3\hoogle-4.2.36\databases
There are no available databases, generate them with: hoogle data
C:\eclipse\workspace\.metadata\.plugins\net.sf.eclipsefp.haskell.ui\sandbox\.cabal-sandbox\bin>
Any ideas here? I'll add additional information as needed, just not sure what would be useful, let me know and I'll edit.
Looks like for some reason hoogle did not work from the command line either. May be related to this:
C:\eclipse\workspace\.metadata\.plugins\net.sf.eclipsefp.haskell.ui\sandbox\.cabal-sandbox\bin>hoogle data
Downloading downloads/platform.cabal
WARNING: Could not find command line program wget.
You may be able to install it from:
http://gnuwin32.sourceforge.net/packages/wget.htm
WARNING: Could not find command line program curl.
You may be able to install it from:
http://curl.haxx.se/download.html
hoogle: Error when running Shake build system:
* default.hoo
* platform.hoo
* platform.txt
* downloads/platform.cabal.cache
* downloads/platform.cabal
Could not find downloader, neither curl nor wget are on the $PATH.
I have Cygwin installed, so I fixed this by running hoogle data from withing Cygwin terminal, which had wget available in the path and that seems to have solved the issue.

Tesseract problem with mftraining stage

I've successfully created a box file with tesseract
now after running the unicharset_extractor
having it creating the unicharset file that looks like:
...
n 3 NULL -1
s 3 NULL 23
t 3 NULL 43
...
I've continued with this command
mftraining -U unicharset -O testlang.unicharset testlang.tr
only to get the next error
Reading testlang.tr ...
testlang has no defined properties.
Error: Illegal short name for a feature!
I've never worked with Tesseract, but it seems there is an open issue in the bug database that looks a lot like your problem : http://code.google.com/p/tesseract-ocr/issues/detail?id=385
It seems that it is related to scientific notation not being correctly supported by some functions.
On the issue page a user suggests a solution, and another one proposes a patch. You could try applying the patch to see if it helps.