LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for simple labview program to handle photographs

I need to produce a program to allow a user to start a slideshow of images, and also to be able to click on an individual image and make it full screen. I am using Labview 7.1.1 on XP. Any example code would be greatly appreciated.

 

Thanks,

 

Howard Spec

CMC Electronics

Canada

0 Kudos
Message 1 of 4
(2,649 Views)

Howard,

 

I have put together a slide show program which I use for my own presentations.  However, it is in version 8.x and not in good enough shape that I would want to post it. 

 

The program is a Producer/Consumer architecture.  The producer loop has an event structure which monitors button presses (Value Change events) and mouse down on the thumbnail picture display.  Consumer state enum values are enqueued in each event case.  The consumer state machine has states: Next, Previous, Display, GoTo, Timed, Marker, Idle (default), Pause, Timer, Halt.  Next, Previous, GoTo, and Timed simply set the index to an array of images.  Prior to entering the loop the user is prompted to select a folder or directory containing the images to be used. A string array of the file names is parsed and converted to paths.  (When I revise this the next time, this may stay path datatype rather than string to path.  The file read may move inside the state machine in an Init case.)  In the display state the index set above is used to select an image file from the array. I check the extension and select the Read JPEG File or Read PNG File VI to open the image.  Property nodes do some scaling and zooming.  The image is displayed two places. One is a thumbnail (about 200x300 pixels) on the control panel.  The second is a full screen image in a Display subVI.  This is set to occupy the second monitor (the projector) and fill the screen.

 

The Timed mode updates the display periodically.  The user can set the delay.  A Pause/Resume button is available.  In the Manual mode large Next and Previous buttons and the Go To button allow the operator to navigate through the file list.  The array of filenames is displayed for the user along with the currently displayed filename and the next filename.  A large Elapsed Time indicator helps keep the operator on schedule. (I have been known to talk too much).

 

The Marker state allows the operator to click on the thumbnail image and place a circle (oval) at that point on both images.  The position is detected at the mouse down event via property nodes.  The operator can change the size of the circle, the thickness of the line, and the color.  I am color blind and find the red laser pointers many people use to be nearly invisible. This marker approach is stable (no wavering hands holding the pointer) and the contrast and size is adjustable.  I usually use black circles with a line width of 4 pixels as default.

 

Lynn 

0 Kudos
Message 2 of 4
(2,634 Views)

Lynn,

 

Thanks very much for the info. I also have started a state machine application for this, so your suggestions for the various buttons and corresponding states will be useful. My biggest concern for this project is how I will create the full screen display of the image, and since I am using a dual monitor setup, how I can force the full screen display onto the second monitor. In my case the second monitor output is connected to an LCD display that we are testing. I found a few discussions about this, but the code snippets were also in version 8.x and I checked my version 7.1.1 and found that I don't seem to have some of the properties used - ie the ability to set the monitor number to display the image on. I guess I will just have to experiment a bit in this area.

 

Thanks again,

 

Howard 

0 Kudos
Message 3 of 4
(2,625 Views)

Howard,

 

I do not have LV 7.1 on this computer, so I cannot look at what is available in that version.

 

On the Mac, the OS lets you configure monitor positions.  It is not too difficult to manually position the Display.VI on the second screen.  I don't have any experience at this with other OSes.

 

I think the VI properties >> Run Time Window Position... was available in version 7.  Try Centered and Maximized, if those options are available.

 

Lynn 

0 Kudos
Message 4 of 4
(2,616 Views)