Use OpenFrameWorks/Quartz Composition image data?

So I have been tinkering with the Skeleton sample project on a Mac and I have a couple of questions. First off, How can we pass image data from say Quartz Composition or a Openframeworks project(C++,Xcode) or any other to the render function of the plugin. For example from Openframeworks I can get a pixels as an array of unsigned chars. Can I supply it to the render function? If so, how? Also I have seen people using Quartz Compositions to make plugins for AE. Can some one help me figuring out how to pass the image data from the composition to the render function in a plugin? Please bare with me, as I am a newbie and I really hope some one could help me.
Thank you!

as for bit depths:
there a 3 different iteration suites. one for each bit depth.
i couldn't find them in the documentation but if you go to the definition of any of them in the code, you'll find the others.
you must use the appropriate suite for the kind of buffer you're using or the function will fail.
how do you tell which one to use?
if you created the pixel world yourself, then you know it's kind.
to find out which depth AE hands you, use PF_GetPixelFormat.
take a look at the "smarty pants" sample project. it shows how to handle that.
actually the shifter sample implements that as well, so forget what i just said. (yes you were right)
as for your x y question, i'm not sure what you're asking.
i managed to understand that question in 2 ways.
so here are 2 answers.  :-)
1. if you're asking how to tell the coordinates of the pixel you're currently being handed by the iteration suite,
then the x and y coordinates are given to you by the iteration function.
to be more precise, it gives you the following data:
refcon - a pointer to whatever piece of memory you sent to the iteration function. (use it to transfer data into your iteration function)
x - the x coordinate of the current pixel in the output world.
y - that one's kind of obvious...
in - the current pixel's content from the input world (if the in and out worlds are of the same size, then the x and y coordinates for both worlds are the same)
out - the structure into which you put your result RGBA (you may fill that world with whatever you like before the iteration, thus getting two inputs to use for your calculation)
2. if you're asking how to tell which pixels are being sampled using the sample suite (as used in the shifter sample),
then these are shorts, bit shifted.
these values are compatible with what you get reading data from a point param.
these values are NOT comfortable to use for anything else.
why? relics of what was most efficient CPU-wise 12 years ago.
you can sample a pixel buffer in 3 ways:
"nearest neighbor" for fast performance,
"subpixel" for accurate results,
and "area sample" for... when you need... an area. (duh)
for more info, investigate the "PF_SampPB" structure.
in any case,
you don't have to get the input using the sample suite.
you can always use the input pixel as it is, or get the pixel from the quartz thingie you want to use.
i tend to think that the first answer was what you we're looking for , but what the heck.

Similar Messages

  • Can I use Bridge to export image data into a .txt file?

    I have a folder of images and I would like to export the File Name, Resolution, Dimensions and Color Mode for each file into one text file. Can I use Bridge to export image data into a .txt file?

    Hello
    You may try the following AppleScript script. It will ask you to choose a root folder where to start searching for *.map files and then create a CSV file named "out.csv" on desktop which you may import to Excel.
    set f to (choose folder with prompt "Choose the root folder to start searching")'s POSIX path
    if f ends with "/" then set f to f's text 1 thru -2
    do shell script "/usr/bin/perl -CSDA -w <<'EOF' - " & f's quoted form & " > ~/Desktop/out.csv
    use strict;
    use open IN => ':crlf';
    chdir $ARGV[0] or die qq($!);
    local $/ = qq(\\0);
    my @ff = map {chomp; $_} qx(find . -type f -iname '*.map' -print0);
    local $/ = qq(\\n);
    #     CSV spec
    #     - record separator is CRLF
    #     - field separator is comma
    #     - every field is quoted
    #     - text encoding is UTF-8
    local $\\ = qq(\\015\\012);    # CRLF
    local $, = qq(,);            # COMMA
    # print column header row
    my @dd = ('column 1', 'column 2', 'column 3', 'column 4', 'column 5', 'column 6');
    print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    # print data row per each file
    while (@ff) {
        my $f = shift @ff;    # file path
        if ( ! open(IN, '<', $f) ) {
            warn qq(Failed to open $f: $!);
            next;
        $f =~ s%^.*/%%og;    # file name
        @dd = ('', $f, '', '', '', '');
        while (<IN>) {
            chomp;
            $dd[0] = \"$2/$1/$3\" if m%Link Time\\s+=\\s+([0-9]{2})/([0-9]{2})/([0-9]{4})%o;
            ($dd[2] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of CODE\\s/o;
            ($dd[3] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of DATA\\s/o;
            ($dd[4] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of XDATA\\s/o;
            ($dd[5] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of FARCODE\\s/o;
            last unless grep { /^$/ } @dd;
        close IN;
        print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    EOF
    Hope this may help,
    H

  • How can I use an image from an ip address for use in labview as image data?

    I want to use a stand-alone webcam on ethernet as the source for imaging control.

    Greg,
    Lots of possibilities here, depending on what your Webcam software serves up and how flexible you need to be with image types and whatnot.
    Assuming the Webcam server provides raw JPG images that you can get at with a simple URL, one way to go is to use DataSocket, using a little trick where you append "[txt]" to the end of the URL and get the raw content back. I've attached an example that grabs a JPG from the NI site and displays it.
    Best Regards,
    John Lum
    National Instruments
    Attachments:
    JPG_to_picture.vi ‏50 KB

  • Get image data in vc++

    hi  all,
    i'd like to use vc++ to process image data (read/modify pixel values, display the image, etc.) through imaq library.
    sample code:
    // get the frame
    imgGrab (Sid, &ImaqBuffer, TRUE);
    // display it using imgPlot
    imgPlot ((GUIHNDL)ImaqSmplHwnd, ImaqBuffer, 0, 0, AcqWinWidth, AcqWinHeight, CanvasLeft, CanvasTop, plotFlag);
    imaqBuffer ist the buffer for storing image data, which was declared as follows:
    static char *ImaqBuffer=NULL; // acquisiton buffer
    How can i get the image data from "ImaqBuffer"? (how to get the buffer size?)
    thx a lot!
    scott

    Hi Scott, wit installing NI-IMAQ you will get examples.  You can find them in C:\Programme\National Instruments\NI-IMAQ\Sample\MSVC\Grab I think they will answer your question.
    Thanks, Rebecca
    NI, Germany Applications Engineer
    Rebecca Fox
    Applications Engineer
    National Instruments

  • HT201250 Hello i am using TimeMachine to back-up entire Mac image (data + system) on an usb-local drive. I would like (on top of it) add a specific plan to back up some files on a remote network drive. Does TimeMachine support multiple back-up plans ? How

    Hello i am using TimeMachine to back-up entire Mac image (data + system) on an usb-local drive. I would like (on top of it) add a specific plan to back up some files on a remote network drive. Does TimeMachine support multiple back-up plans ? How ?

    Time Machine is capable of backing up to multiple locations, and can be used to back up to both a local hard drive and a networked drive (provided that that drive is in or connected to a Time Capsule or another Mac that is sharing it over the network). The catch, though, is that you can't specify different things to back up to different destinations. Whatever you exclude from Time Machine backups is excluded from ALL backups, and whatever is included is included on all.
    So, get a large enough drive that you can back up everything you want in all locations, or use something else for maintaining the network backup.
    More information on these topics can be found here:
    How do I set up Time Machine to a shared drive on another Mac?
    How do I set up Time Machine to a Time Capsule or Airport Extreme?
    "Rotating" Time Machine backup disks

  • [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)

    Dear Experts,
    i am getting the below error when i was giving * (Star) to view all the items in DB
    [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)
    As i was searching individually it is working fine
    can any one help me how to find this..
    Regards,
    Meghanath.S

    Dear Nithi Anandham,
    i am not having any query while finding all the items in item master data i am giving find mode and in item code i was trying to type *(Star) and enter while typing enter the above issue i was facing..
    Regards,
    Meghanath

  • Error in SQL Query The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query

    hi Experts,
    while running SQL Query i am getting an error as
    The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    T2.LineText
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,T2.LineText
    how to resolve the issue

    Dear Meghanath,
    Please use the following query, Hope your purpose will serve.
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    CAST(T2.LineText as nvarchar (MAX))[LineText]
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,CAST(T2.LineText as nvarchar (MAX))
    Regards,
    Amit

  • Using image data read out from a file

    Hi,
    Having used the GetBitmapFromFileEx(), GetBitmapInfoEx() to acquire the necessary image data (most of them is the .png format), then using the FileToArray() to put the image data in my own binary file, e.g., "mypicture.dat". My idea is that whenever need to use the image, I can read out it from mypicture.dat and then display it on a pcture control.  But when loading the image data to the memory, I have no idea to map the image data buffer to an image resource, which can let to acquire a bitmap ID.  Because from the  cvi's image processing function lists, it seems that must through such as  the GetBitmapFromFileEx(), GetBitmapFromFile() to acquire the image data buffer and the bitmap ID, then using SetCtrlBitmap() to diplay it. Is there any way to resolve the problem? Thanks.
    David 

    Well, to read and write raw data file informations from a PNG image you must adhere to this standard. As a source of informations you may take a look to this Wikipedia page and to the links in this page from the PNG Home site.
    So the problem is: does your application worth the effort to study this documentation?
    Edit: FYI part of this job has been already made in CVI by Guillaume Dargaud for his ReadSavePNG instrument driver. It's been a long time since I have used this instrument, as I/O operations on PNG files have been integrated into CVI since release 8 and support for JPEG files in release 7 or so. Nevertheless I saw functions in that instrument for accessing raw data in a PNG file so you may find them useful for your needs.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Want to check which data source is used by the composites

    HI All,
    I have a requirement here in which i want to see that which data source is used by the composites deployed on SOA.
    I dont have the code.
    Is there any quick way to do it(from console or backend without downloading the code)
    Thanks

    You can export the jar file from the EM console.
    1) Login to EM console
    2) Right click on the composite and select Export and With default options click on Export button
    Find the data source name from the exported code.
    Mark the posting appropriately as "helpful" or "correct answer", if your issue is solved.
    Regards
    Albin I
    [http://albinsblog.com/]

  • Problem using linear workflow to composite images with nonlinear transparency

    First off: I love what a fully linear workflow does for the proper behavior of gradients, transparency and the like.
    HOWEVER in both Premiere and AE I have found no simple way (within the linear workflow) to properly/accurately composite images that were not linear to start with/have nonlinear alpha channels. For example, I have an 8 bit RGB photoshop file with 2 layers: one with transparency and the other a white background. If I export the transparent layer as a png (or for that matter save it as a standalone psd), bring it into PP or AE and put a white solid behind it, it doesn't look the same as in the original photoshop file unless I turn off "composite in linear color".
    My best workaround so far is to bring the transparent image into AE (working in a linear color space) and manually adjust the gamma of its alpha channel using a combination of of track mattes/levels/shift channels effects to counteract the improper interpretation of the gamma of the alpha channel, since there's no effect or setting to change the linear/nonlinear interpretation of the gamma of the alpha channel.
    Is anyone at Adobe working on addressing this issue? Why isn't there an effect (or setting in "interpret footage") to allow us to specify if the source material has linear or nonlinear gamma? EDIT: I have just realized that there is a color management option in the AE footage interpret dialog (but not PP), but when I attempt to use it with a png it is greyed out/disabled.
    Thanks,
    Henry
    Message was edited by: Henry Reich

    Well, you could just not use PNG but instead TIFF? The behaviors are built into the file format and using a limited 8bit format in a linear workflow doesn't make that much sense in the first place...
    Mylenium

  • Extracting an image data merge field using only an indesign file and not document.dataMergeProperties.dataMergeFields

    Hi,
    I have kind of a weird requirement but I hope you guys can help out.
    I need to extract all the custom fields used in an indesign file without referencing the dataMergeProperties of a document. Sorry if this is a weird request it is just what I've been told (our system needs to not crash when people upload a variety of in design documents to generate high resolution jpg preview documents).
    I can already get all the text custom fields by looking for "<<" and ">>" in the text frames of a document but I'm having a really hard time finding the image custom fields.
    I tried looking at the rectangles for a given page but that didn't seem to help (but maybe i'm missing some there). I also tried looking at the graphics and images collection of a document but this seemed to return only graphics that are hard coded on the in design document and not the custom image fields.
    Any help would be appreciated!

    Uggg....
    Found the answer after I realized I was looking at the wrong SDK (5.0 instead of 6.0)
    I'm using the doc.hyperlinkPageItemSources property to get these images. It also looks like you can get the image data merge fields from DataMergeImagePlaceholder (but rememeber I couldn't access this).

  • Get clipboard image data using Flash

    Hello
    Please help me to get clipboard data(text as well as image) using flash component.
    Or is it possible using Adobe AIR, please help me....
    Thanks in advance...
    Thanks,
    Abdul Javed Khan

    Hello
    Could you please send me code for copying clipboard data(Specially IMAGE Data) using AIR.
    Or send me link demonstrating this feature with source code because I am new to flash...
    Thanks,
    Abdul Javed Khan

  • How to read the Image Data using HTTp Request response

    i want to read image data from server please send me any code or answers.
    and also i want to exit application using button control for iphone simulator.
    thanks in advance.

    You would do a URLRequest and download the image. You could save it to disk and then load it or directly create a new image with the binary data.

  • Jdev11g: How to use a Ord.image data type with ADF Faces 11g

    Where to find an example about Ord.image data type with ADF Faces 11g preview3

    Hi,
    such a sample doesn't yet exist.
    Frank
    Btw.: The Jdeveloper 11 forum is JDeveloper and OC4J 11g Technology Preview

  • Multi-camera IMAQdx systems: shortcuts for stitched composite image

    Imagine a system using for example multiple GigE cameras through the IMAQdx interface where we wish to form a composite stitched image from the multiple camera views. The stitching principle is naive, straigthforward concatenation, one next to another.
    The problem is that where it is trivial to build such a composite image, it's difficult to do it very efficiently. The image sizes are large, tens of megapixels, so every copy matters. Alternative hardware configurations would open up a lot of options but say we're stuck using GigE cameras and (atleast initially) the IMAQdx interface. What tricks, or even hacks, can you guys imagine facing this challenge?
    I've seen some talk about the IMAQdx grab buffers and it appears to me that one cannot manually assign those buffers or access them directly. The absolute optimal scenario would of course be to hack your way around to stream the image data directly next to each other in the memory, sort of as shown below in scenario1.png:
    The above, however, doesn't seem to be too easily achieved. Second scenario then would be to acquire into individual buffers and perform one copy into the composite image. See illustration below:
    Interfaces usually allow this with relative ease. I haven't tested it yet but based on the documentation using ring buffer acquisition and "IMAQdx Extract Image.vi" this should be possible. Can anyone confirm this? The copying could be performed by external code as well. The last scenario, without ring buffer, using "IMAQdx Get Image2.vi" might look like this:
    The second copy is a waste so this scenario should be out of the question.
    I hope this made some sense. What do you wizards say about it?
    Solved!
    Go to Solution.

    Hi,
    Sorry, the contraints are not really well documented as they are dependent on platform, camera type, camera capabilities, and how the driver handles things. All of these are subject to change and so we decided instead to try to make the errors be very self-descriptive to explain how to fix any requirements.
    You are correct that these fundamentally come down to making sure that the image buffer specified is able to be directly transferred to by the driver. The largest requirement is that the image data type is the same and doesn't need any decoding/conversion step. The other requirements are more flexible and change depending on many factors:
    - No borders, since this adds a discontinuity between each line. This error doesn't apply to GigE Vision (since the CPU moves the data into the buffer) or to USB3 Vision cameras that have a special "LinePitch" feature that can allow them to pad the image lines. The USB drivers of more modern OSes (like Win8+) have more advanced DMA capabilities so it is possible/likely that this also can be ignored in the future.
    - Line width must be a multiple of 64-bytes (the native image line alignment on Windows) - same as border
    So, if you end up using GigE Vision cameras, this should just work. If you want to use USB3 Vision you have a few more contraints to work with.
    Eric

Maybe you are looking for

  • ITunes will no longer open

    Hi there, I have installed the newer version of iTunes, and it will no longer open when I click on the desktop icon, or use the Start/Programs/iTunes/iTunes. All I see is the hourglass for about 2 seconds, and then nothing. I have uninstalled and re-

  • Appilication Fails in Firefox

    Hi all, I am working on an WD app that is running on a back end J2EE.  The app runs great on my local portal with both IE and Firefox. The application also runs without problem on IE with the back end J2EE. Firefox and mozilla cause the app to crash

  • Currency display in a particular query

    Hi, In a Bex query I don't want to display the currency along with the amount . I have tried using SPRO but this applies to all the queries so is there another way to hide the currency for single query? Thanks in Advance,   Sheetal

  • Virtual console (Something usefull when Leopard hangs...)

    I'm still looking for the possibility to enable virtual consoles on OSX, in order to rescue Leopard, when it becomes unresponsive, instead of hard shutdown the whole system (it happends quite often). Any tip? I googled and tried with /etc/ttys, but w

  • CS6 production premium wont install correctly it stalls at the adobe help files

    anyone know how to fix this?