OSX:

...

Color Masks

The color masks of the camera are working correctly now...

Color masks

GSOC Week 3-4

The past two weeks I was busy studying for my examinations, so I didn't have much time to work on my GSOC project. However I was able to do a lot of work to get the PyCameraObject struct integrated in the existing code and implemented some additional functions.

Here is the definition of this struct, it isn't completed yet because some "types" I would like to put into it cause compile errors.

PyCameraObject:

typedef struct {
    PyObject_HEAD
    char* device_name;              // unieke name of the device
    SeqGrabComponent component;     // A type used by the Sequence Grabber API
    SGChannel channel;              // Channel of the Sequence Grabber
    GWorldPtr gWorld;               // Pointer to the struct that holds the data of the captured image
    Rect boundsRect;                // bounds of the image frame
} PyCameraObject;

In addition of implementing the PyCameraObject struct, I have writen the folowing functions.

  • mac_device_init():
    This function initializes the sequence grabber component and prepares it for capturing images.
  • mac_device_close():
    I have extended this function so it works with the PyCameraObject struct.
  • mac_start_capturing():
    At this moment this function
  • camera_start():
    This function just calls the above functions.
  • camera_get_size():
    Simple function that returns the size of the image frame.

Schedule for this week

This week I am planning to finish the mac_start_capturing function so that I can capture images from my camera an put then in a SDL_Surface object. As usional you can folow my work on my github account.

GSOC Week 1

Hello,

Welcome to my weekly address to the PyGame Nation. This is the first of many entries about my work on the camera module for Mac OSX.

This week I have written the following 'simple' functions:

  • mac_list_camera:
    On the module for Linux, a list of available cameras in made by trying out every potential device. On the OSX module I use the FindNextComponent function to search for Components of the SeqGrabComponentType type.
  • mac_device_open:
    A simple function that open a camera, it uses OpenComponent.
  • mac_device_close:
    A simple function that closes a camera, it uses CloseComponent.

The remaining time I have spend on build problems and bugs :(

Schedule for next week

The coming week I will spend my time on defining and implementing a camera class specific to Mac OSX, because the existing class is to much intertwined with v4l. When I have done that I will be able to integrate the above functions into the python module.

As usual you can follow my progress on my github account

PS I still have to add a comment system to this blog, so if you would like to comment on something I suggest you do this on the pygame mailing list.