Re: Need help with Image Aquisition code
- From: Jamie Guinan <guinan bluebutton com>
- To: Jerry Mulchin <jmulchin astroguy com>
- Cc: Gnome Developers List <gnome-devel-list gnome org>
- Subject: Re: Need help with Image Aquisition code
- Date: Thu, 1 Feb 2001 16:37:01 -0500 (EST)
I've done a similar program that works roughly as follows:
gtk_init(&argc, &argv);
gdk_rgb_init(); /* Do everything in RGB, let gdk worry about display
depth, etc. */
display_init(); /* Create display window. */
while (1)
{
img = capture_image(); /* Captures image, returns buffer
descriptor including raw image. */
process_image(img)); /* Convert raw image to RGB, color-correct,
etc. */
display_image(img); /* gdk_draw_rgb_image() into window */
while (gtk_events_pending()) /* Handle pending GTK events. */
{
gtk_main_iteration();
}
free(img); /* Free descriptor. */
}
I can get away with while(1) by simply calling exit() from my
key_press_event signal handler. Its Unix, it can handle it. :)
-Jamie
On Wed, 31 Jan 2001, Jerry Mulchin wrote:
>
> I'm writing a GTk/Gnome application that will acquire images from a
> CCD camera. I'm at the point where I'm ready to acquire the image,
> but I don't know where to put the loop to process the acquisition.
>
> I have a window that I open in preparation to displaying the image.
> The loop will run, just acquiring images until the user closes the
> window the image is displayed in. The act of closing the window
> needs to destroy not only the window, but also terminate the loop
> grabing images from the camera.
>
> I don't think I want to use the "idle" function to do the acquisition,
> but I don't know what else to use.
>
> I'm looking for suggestions to my dilemma.
>
> Thanks in advance
>
> Jerry Mulchin Amateur Radio Call - N7EME
> Programmer, Amateur Astronomer, Ham Radio
> e-mail (home) - jmulchin astroguy com
> e-mail (work) - jmulchin cisco com
> Astronomy Web Page http://www.astroguy.com
> "It is never wrong to ask a question, it is always wrong to be ignorant."
>
> _______________________________________________
> gnome-devel-list mailing list
> gnome-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devel-list
>
--
================================================================
Jamie Guinan Blue Button Solutions, Inc.
guinan bluebutton com http://www.bluebutton.com/
================================================================
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]