Displaying images using opencv running on remote host, on local display? - opencv

I have a simple piece of code which uses openCV, and I want to run it on an ARM development board (freescale MX) which has no display attached to it.
I've been trying for few days now to run the code on this remote device, and display its graphical output on my local machine, with no luck...
My setup:
Ubuntu 10.04 on my local machine
Linux 2.6 running on the board, with all the relevant packages I could think of.
Ethernet connection to my local machine
openCV compiled statically with GTK enabled
using GDB/GDBServer for debug using SSH
and everything is running just fine accept for openCV's HIGHGUI display functions, which have no affect.
Some notes:
I can set the DISPLAY env var to point to my local machine, and I get
gtk-demo/xterm/whatever-is-using-X to appear on my local machine,
even when running from the same SSH session I use for running and
debugging my code.
I'm trying to avoid getting into GTK/QT and patching/ preparing my own display wrapper. I got the feeling that I just need a small modification to the GTK/HIGHGUI config to make this work...
My code (which compiles and runs ok, accept for having no graphical output):
cv::Mat im = cv::imread("/root/capture.jpg");
//im is valid and not empty at this point
cvNamedWindow( "test" );
cv::imshow( "test", im);
cvWaitKey();
cvDestroyWindow( "test" );
Can anyone assist?
Thanks
Update:
Solved
While reading the message I've just posted, I found out that - I actually used getchar() instead of cvWaitKey(), which seems to be important...

Related

How can I keep the second page from printing upside down?

I'm using old VB6 code that seems to work perfectly fine on a Win7 desktop. At some point the code is using the Printer object doing things like this...
Printer.font.Bold = True
Printer.CurrentX = xpos
Printer.CurrentY = ypos
Printer.Print LinesToPrintArr(LineNum, i)
The pages are printing duplex and binding on long edge (top) so that you flip the pages up while being bound on the long edge. Everything is printed landscape. On Windows 7 this works without any issues. However recently we started using OSs such as Windows Server 2012R2 or later. For some reason, the first page is perfect and the second page (on the back of the first) is printed upside down.
Note: The application built is actually calling a COM object to do the
printing, so making the app (that is running on a win10 machine) run
in compatibility mode (win7) while calling a COM object on the server
(2016) I don't think would help any.
Example of how it should look on all OS versions...
Example of how it does look on server OS (which is wrong)...
Does anyone know why this is happening on a new server OS (like server 2016) and not on Windows 7? Is there a control or other support file I might be able to downgrade that Win7 uses to make this function the correct way? I'm guessing this has to do with the vb6 printer object used inside vb6.

sdram banks configuration in uboot

I had made uclinux(uboot+kernel+romfs) for my disco board for (stm32f429).
Now I have a custom board which uses different bank (bank1 instead of bank2 in disco board) I tried to configure u-boot according to new board but I have an odd problem:
when I use the old u-boot without any changes, the boot loader can see kernel image but it has a HARD FAULT ERROR when it extracts the kernel image to SDRAM,and this is natural!
BUT when I configure uboot according to new board structure even uboot doesnt load and I see nothing in serial console!
could you please help me about it, it is more than two months Im trying to solve it!!!

viewing a X3DOM file locally

I am running Linux Mint 17.1 (Rebecca)
on my Dell 4x Intel(R) Core(TM) i3-5005U CPU.
I have done X3D in a viewer in the past, but am now
try to do X3DOM in a Google Chrome v42 browser.
I can, for example display
examples.x3dom.org/example/x3dom_helloWorld.xhtml
from x3dom.org website. But when I copy locally to my machine
and try to view I get
"XMLHttpRequest cannot load file:///home/andrewmneiderer/src/Web3D/X3DOM/x3dom.swf. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource."
Has anyone seen this error and have suggestions on what to do?
I wonder why this is not stated in the current documentation, but I remembered that I read it. You can find it in the documentation of previous versions http://x3dom.org/download/1.5.1/docs/html/notes/platforms.html#chrome
Recent releases of Chrome require you to enable WebGL. Please use the
following command parameters when launching chrome:
--enable-webgl
--use-gl=desktop
--log-level=0
--allow-file-access-from-files
--allow-file-access
The last two options enable the browser to load textures from disk. You will need this if you are developing your site
locally.
Furthermore there is an option --disable-web-security which has been mentioned here: http://x3dom.org/docs-old/notes/cors.html#chrome
Besides from that, I think you should try to get a machine with native WebGL support since this Flash version of X3DOM is just a fallback method which might lack the performance features of the native version.
Chrome on all systems (by default) does not enable loading of resources from the local disk - even when the parent HTML comes from the local disk. Firefox, IE, and (I think) Safari all allow local file loading. If you need to load X3D files using X3D from your local disk, then you need to implement a local web server. It is not necessary to run a full-blown Apache server. Google 'local web server' for various options.

ComputerCraft Run Chat Command

I host a server and I was wondering: is there any way to run chat commands through ComputerCraft? I want to be able to run /tps through the ComputerCraft terminal and then have it print out the TPS. Help would be greatly appreciated.
Thanks.
In the new Computercraft 1.7 there is a new type of computer, the Command Computer. It allows the user to run commands the same way as shell.run("mkdir", "foo"). It can only be obtained by ops, and can only directly be controlled (we are talking without using rednet and such) by ops
commands.exec(string command) -- Runs and outputs command output in chat.
commands.execAsync(string command) -- Quietly runs command without output.
Here is the wiki page:
Commands (API)
But if we are talking 1.6.4 (Which almost all modpacks use) there is no "stock" version of doing that.
Hope it helps /Tyrerexus
I believe that you can use this thing called the Chat Box.
http://ftbwiki.org/Chat_Box
It's not part of the default Computercraft, however. It is part of the Misc Peripherals mod I believe.

Why does Rails cache view files when hosted on VM and codebase on Samba share

I have the following setup:
Code on my local machine (OS X) shared as a Samba share
A Ubuntu VM running within Parallels, mounts the share
Running Rails 2.1 (either via Mongrel, WEBrick or passenger) in development mode, if I make changes to my views they don't update without me having to kick the server. I've tried switching to an NFS share instead but I get the same problem. I would assume it was some sort of Samba cache issue but autotest picks up the changes to files instantly.
Note:
This is not render caching or template caching and config.action_view.cache_template_loading is not defined in the development config.
Checking out the codebase direct to the VM doesn't display the same issue (but I'd prefer not to do this)
Editing the view file direct on the VM does not resolve this issue.
Touching the view file after alterations does cause the changes to appear in the browser.
I also noticed that the clock in the VM was an hour fast, changing that to the correct time made no difference.
I had the exact same problem while developing on andLinux.
My andLinux's clock was about three hours ahead of the host Windows, and setting the correct time (actually, a minute or so behind) has solved the problem.
Actually, setting the correct date & time in the VM does seem to have solved the problem (after I restarted mongrel) -- going to do a little more digging.

Resources