|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Modifying image sent to Dashboard
Is there an easy way to modify the image displayed on the dashboard, so I can test my vision code (i.e. check if the thresholding is working well)?
Thank you for any help. EDIT: Just to clarify, this is Java. |
|
#2
|
|||
|
|||
|
Re: Modifying image sent to Dashboard
Quote:
Full Version, From what ive seen, im not sure if you can directly modify the images with, say for example a SetPixel() or DrawLine() function or anything of that matter. The closest thing ive seen to this, is that the dashboard is specfically programmed to recieve extra data on a specific port, then draw over the recieved image, post-crio. None of that data was specifically documented which is slightly annoying because it would be nice to be able to do custom implementations. For example, last year, it was sent on another port, that contained all dashboard data (minus image), it had different sections of data for different parts, such as PWM readouts, solenoid readouts, etc, but also send over a list of points and sizes for circles, that would be drawn over the image. |
|
#3
|
|||
|
|||
|
Re: Modifying image sent to Dashboard
So, then, does anyone have a good way to test image processing code?
Thank you for your help. |
|
#4
|
|||
|
|||
|
Re: Modifying image sent to Dashboard
Quote:
1) just output to console some info, life for example points of detected items and the such. 2) Do the same as the dashboard, but write your own. Second option is a obviously more difficult, but if you would like some help with programming it, i would be more than happy to help you write it. Im more partial to C#, but i know Java very fluently as well, and its what im programming the robot in. Just let me know if i can be of any help. |
|
#5
|
||||
|
||||
|
Re: Modifying image sent to Dashboard
You can use the ZomB Dashboard, It has multiple target tracking support. Once installed:
Target format: widthxheight+top,left where all numbers are normalized (-1 to 1) z.Add("targetname", width+"x"+height+"+"+top+","+left); camera view notes: You must create a camera instance in your code, connecting to the switch directly is not supported yet (wait a few days) |
|
#6
|
|||
|
|||
|
Re: Modifying image sent to Dashboard
Okay, I have tried to use the following methods to view the result of my processing:
Code:
Method | Reason it failed --------------------+----------------- Send to Dashboard | Haven't found any way to do it Save to file | NI disabled it Output with println | Can't read individual pixels |
|
#7
|
|||
|
|||
|
Re: Modifying image sent to Dashboard
As far as I can tell, there is no way to do it if you wish to use NIVision (due to the undocumented nature of EVERYTHING). I ended up just plugging in the camera to the bridge/router and I am going to be writing my own image processing code which will run on the computer.
|
|
#8
|
|||
|
|||
|
Re: Modifying image sent to Dashboard
Due to the reason that WPI Lib is HALF-BAKED this year, it will be nearly impossible for you to do any effective image processing in Java. This is because WPI Lib does not expose any native NI Vision functions (imaq*) to you (which are accessible in C++, but still undocumented.) Even if you do get image processing code you wrote yourself in Java working, it will take you a while to optimize it, and once you do, it still won't be nearly as fast as native optimized code from NI's Vision library, and will probably cause too much lag to be usable.
If you are not going to program in LabVIEW, I would recommend going C++ this year if you need to do image processing. Last edited by EdenA : 24-01-2011 at 03:22. |
|
#9
|
|||
|
|||
|
Re: Modifying image sent to Dashboard
Those undocumented functions are "described" in C:\Program Files\National Instruments\Vision\Documentation\NIVisionCVI.chm.
If some imaq functions have not been wrapped for Java, perhaps you can do the wrapping by following the code. If you would like to communicate data back to the dashboard app, this was done last year in all languages I believe. The data is packed and sent as part of the UDP response packet. At the dashboard, it is unpacked using the LV unflatten node, and the data can be used to annotate the image. When you say that NI disabled saving to file, are you talking about the IMAQ file functions? Some of these rely on Windows elements and that is why they do not exist for any language. You should be able to use file I/O to save the data of the image for later analysis. You can also open up any TCP port you like and use those in the lab for debugging. The ports will be disabled for official fields. To use the standard dashboard communications look at the packing classes. Greg McKaskle |
|
#10
|
||||
|
||||
|
Re: Modifying image sent to Dashboard
Quote:
My personal opinion but the language you use should have no effect on the success of your code this year. As proven by my week 1 camera tracker done in java. |
|
#11
|
|||
|
|||
|
Re: Modifying image sent to Dashboard
can i get that code for camera tracker. you can email it to me at mydrum9@gmail.com
|
|
#12
|
|||
|
|||
|
Re: Modifying image sent to Dashboard
What I was thinking is use the circle tracker demo modified to not look for the inner circle. . .
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|