Is this possible to access arbitrary frame and to modify the mask?..

Sorry for a bit messy discussion title. Please, let me explain.
I have some experience in implementing video processing algorithms, but as our own software and never under AE. Now there is an idea to implement something for AE and first of all, I'm curious, if this is possible at all.
1) When processing the n-th frame, I need the full access to the data of (n-k)-th and (n+k)-th. Is this possible to do in general case? Or the only variant is to implement frames buffering during the first pass?
2) Our algorithm uses the mask as one of the inputs. But in contrary to the usual case, mask does not define an area of interest. In any case the full frame is processed, but the processing differs for different regions, depending on mask. In our software, it works like this: user defines a mask (and some parameters). Then effect is slightly modifying (let say – refining) the mask during the render and renders final images. After this user can modify the mask somehow again if he/she is not satisfied with what algorithm has done. Can I produce the same workflow in AE? The only way is using a drawbot (this means CS 5.5 and higher)? And what if I want masks to be raster images?
The second question in the framework of this one is how to do two video inputs for an effect (first – the video to be processed and second – the mask (grayscale sequence in general case))?
The possible workflow is that user provides trivial mask – lets say, the black solid. But even during the first pass effect should produce the mask, according to its sight to the video – so, it should somehow substitute the black solid with the sequence on black'n'white images. Is this all possible in AE?
3) Is this possible (should be, I guess) to implement multipass algorithms? How the preview works then, if I need, for example, to pass all the video length 3-4 times, to produce the final render?
I can expect that all this is solvable in AE, but may be experienced users could be so kind to give me some basic recommendation on how to do this. Looking through the PDF, which accompanies the SDK has not allowed to come to a distinct answer for the question: is this possible or not. So, I rely on your consultation.

hi Theofil Mulony, welcome to the forum!
in short, yes, what you want to do is possible, but some parts may be tricky.
and now the long version:
1) When processing the n-th frame, I need the full access to the data of (n-k)-th and (n+k)-th. Is this possible to do in general case? Or the only variant is to implement frames buffering during the first pass?
you can access the pixel data of any layer at times other than the currently processed time. this concept of getting that data is referred to as "layer checkout" in the AE SDK, and "wide time" is the name of getting pixel data at times other than the current.
the following thread discusses the difference between two methods of getting such data:
http://forums.adobe.com/message/4033930#4033930
you can also look at the "checkout" sample project to see how both concepts are implemented.
2) Our algorithm uses the mask as one of the inputs. But in contrary to the usual case, mask does not define an area of interest. In any case the full frame is processed, but the processing differs for different regions, depending on mask. In our software, it works like this: user defines a mask (and some parameters). Then effect is slightly modifying (let say – refining) the mask during the render and renders final images. After this user can modify the mask somehow again if he/she is not satisfied with what algorithm has done. Can I produce the same workflow in AE?
masks in AE generate a matte by default. the user can turn that mask off, so that the shape remains, but the mask does not... mask. (you can also set the mask mode to "none" via API commands).
you can then read the "off" mask attributes and either render using an API command (see "pathmaster" sample to see how), or write your own algorithm if the API constraints on that operation are a problem for you. (and there are a few constraints on rendering masks in the API)
now. when you say "modifying the mask" do you mean you modify it's generated matte, or do you mean change it's defining vector?
both are possible, but completely different.
if you turned the mask off, and rendered it's alpha yourself, then you can modify that alpha as you wish.
if you want to use AE's generated matte of the mask and change the mask's outline shape, then you need to look into "streams" and the "mask outline suite".
the user can modify a mask's shape as he/she pleases, unless you lock that mask or otherwise sabotage the user's operation.
The only way is using a drawbot (this means CS 5.5 and higher)?
drawbot is the API for drawing over AE's interface in CS5 and up.
it's only a drawing tool. previous versions used OS drawing tools. that's all the difference.
what i think you're asking is weather you need to create the mask drawing/handling capabilities or not.
the answer is: you can, but you don't have to.
unless you need control over the mask drawing that AE's existing masks don't have, i would have used AE's masks and not create a brand new mechanism (that the user need to learn as well).
if you insist at creating a custom UI for drawing masks, the "CCU" sample project would be a good place to start the research.
(just don't come crying to me when you get a splitting head ache)
And what if I want masks to be raster images?
The second question in the framework of this one is how to do two video inputs for an effect (first – the video to be processed and second – the mask (grayscale sequence in general case))?
The possible workflow is that user provides trivial mask – lets say, the black solid. But even during the first pass effect should produce the mask, according to its sight to the video – so, it should somehow substitute the black solid with the sequence on black'n'white images. Is this all possible in AE?
by default, "effect" plugins (as opposed to AEGPs) get only one input - the image of the layer, post masks and previous effects (but before transformations).
you can put as many "layer param"s in your effect and let the user select any number of other layers, which you can the "checkout" and use as second inputs.
you can also checkout other layers without the user selecting them manually.
however, checked out layer results are pre-masks and effects. so if the user draws a mask over a black solid, you will not be able to read the "post mask" image unless the user pre-composes the layer with the mask inside the pre-comp. it's a common practice for users to do so, as many effects rely on a second input, and that's the only way to make the input pos-masks and effects. (so it's no biggie from the user's point of view)
in the same manner, you can read any layer's image and use it as a mask.
you get the image buffer, so it's up to you to decide whether to use the alpha channel of that image or the rgb (or any other method you see fit).
3) Is this possible (should be, I guess) to implement multipass algorithms? How the preview works then, if I need, for example, to pass all the video length 3-4 times, to produce the final render?
AE doesn't do multi pass rendering.
it actually can render arbitrary frames, in no particular order.
but as you already saw, you can access the image data from any time - of any time, so you can emulate passes.
if you need to fly through the whole sequence for every frame, that would of course be very time consuming and wasteful.
in such a case, you can try to do these passes only once, when effect is implemented, and cache the results.
look up "sequence data", to see how to manage memory specific to a single instance fo you effect.
but i must say that if you have to do full length scans of the footage, a couple of times over, and cache EVERYTHING, then you're in a bit of a problem in AE.
it's just not set up for such rendering logic.
not impossible, but highly inefficient in the AE rendering pipeline.
there is a lot more to al of the above, but i hope this gave you a clearer picture of how things are in AE.

Similar Messages

  • Entity Framework - Code First - Migration - How to access SQL Server and Oracle using the same context?

    Hello,
    I use Entity Framework code first approach.
    My project is working fine with SQL Server. But, I want to access Oracle too. I want to switch SQL Server and Oracle in run time.
    I am able to access Oracle using "Oracle.ManagedDataAccess.EntityFramework.dl" in a new project.
    But, Is this possible to access SQL Server and Oracle in the same project.
    Thanks,
    Murugan

    This should be possible with a Code-First workflow.  In Code-First the database mapping layer is generated at runtime.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Someone use my phone # to send a text someone in my contacts.   Is this possible without access to my phone?

    A text message appeared on my phone this morning that I did not send.  It was sent to someone in my contacts.  Is this possible without access to my phone?

    Your carrier has a record of your IMEI number, & you can also get it from the box, if you still have the box. You can also get it from iTunes:
    http://support.apple.com/kb/ht4061

  • I want to delete songs from iTunes Match by unchecking them in my iTunes library on my Mac. Is this possible? If so, how do I change the necessary setting(s) in iTunes or iTunes Match?

    I want to delete songs from iTunes Match by unchecking them in my iTunes library on my Mac. Is this possible? If so, how do I change the necessary setting(s) in iTunes or iTunes Match?

    I have seen this page, but it seems that this involves deleting songs from my iTunes library in order to remove them from iTunes Match. I want to keep them in my iTunes library, but not in iTunes match (I am over my limit for songs in iTunes Match, and would like to decide which songs to keep in iTunes Match).

  • I need to export Quicktime files using the PhotoJPEG, MJPEG-A, or DV codec.  Is this possible in Final Cut Pro X?  In the options under export I don't see any of these available.

    I need to export Quicktime files using the PhotoJPEG, MJPEG-A, or DV codec.  Is this possible in Final Cut Pro X?  In the options under export I don't see any of these available.  I'm a newbie to this so any help would be greatly appreciated.

    I'm importing .MOV files from my Canon 5Dmk2 at 1080p.  So should I just export using a different codec and then use Compressor or MPEG Streamclip to convert to an MJPEG-A or PhotoJPEG codec?

  • I just got the Itunes update. So frustrating. I will be trying methods on this forum to save my library and re-install the older version of ITunes. What was Apple thinking when they developed and released this mess?

    I just got the Itunes update. So frustrating. I will be trying methods on this forum to save my library and re-install the older version of ITunes. What was Apple thinking when they developed and released this mess?

    Apple is more likely to see your comments if you send feedback via:
    http://www.apple.com/feedback/itunesapp.html
    =Downgrading from iTunes 11 to iTunes 10.7=
    You may be able to go back with Time Machine but this may involve restoring other items too (https://discussions.apple.com/message/20441404).  Alternatively:
    Back up your computer first, in case the unexpected happens.
    Quit iTunes.
    Get iTunes 10.7 from http://support.apple.com/kb/DL1576 or the direct download link at:  http://appldnld.apple.com/iTunes10/041-7195.20120912.d3uzQ/iTunes10.7.dmg
    Do a few preparatory steps by making sure all iTunes components are not running and cleaning old files.   See https://discussions.apple.com/message/20475394.  Do steps 3 and 4.  Steps 6-8 may be also useful but I don't know if they are essential.  Some of the other steps are not necessary, duplicate steps listed later in my post or are perhaps even unhelpful in the process.
    Replace the iTunes 11 application with iTunes 10.7.  Simply dragging the application to the trash may not work. Lion (OSX 10.7) and newer systems have iTunes integrated into the operating system and deleting is a bit more involved.  Two ways to do this are:
    1.  Use the shareware Pacifist utility (http://www.charlessoft.com/) to install iTunes 10.7 including all associated system files. Details at http://forums.macrumors.com/showpost.php?p=16400819&postcount=6
    2. Check this reference on how to delete the iTunes application itself:
        Delete iTunes in Mac OS X 10.7 Lion - http://osxdaily.com/2011/09/13/delete-itunes-in-mac-os-x-10-7-lion/
        After deleting the application there may be other files that need downgrading too. See the note about error -42408 at the end of this post. You may want to tuck these away somewhere safe until you have completed the installation of iTunes 10.7.  I have not tested this but ideally if newer versions are not found then the installer will put in the old versions. This may include these files in /System/Library/PrivateFrameworks/ which apparently get updated by iTunes 11:
    AirTrafficHost.framework
    CoreFP.framework
    DeviceLink.framework
    iTunesAccess.framework
    MobileDevice.framework
    After doing one of the two procedures above you will have to rescue the most recent old iTunes library from your iTunes > Previous Libraries folder. Rename it "iTunes Library.itl"  and replace the existing one in the iTunes folder. A newer version of iTunes irreversibly updates your library file so you have to replace it with the old one or you will get an error message. Note, this will revert your library to the version at the time of the upgrade and you will have to update any changes made since.  See:
    https://discussions.apple.com/message/20401436 - turingtest2 11/2012 post on rebuilding empty/corrupt library from previous iTunes library file after upgrade/crash.
    iTunes: How to re-create your iTunes library and playlists - http://support.apple.com/kb/ht1451
    Other issues:
    - https://discussions.apple.com/message/20432309 - solution to mobile devices saying they need to be restored after downgrading
    - If you encounter error -42408:
    iTunes: Advanced iTunes Store troubleshooting - http://support.apple.com/kb/TS3297 > Specific Conditions and Alert Messages: (Mac OS X / Windows) - including specific error codes.
    Alternatively, check https://discussions.apple.com/message/20441424 which requires you have a Time Machine backup (though possibly if you remove the newer version of these files old ones may be installed with the iTunes 10.7 installer - untested).  A  variant of this is at: https://discussions.apple.com/message/20448184
    - Persistent "Show in iTunes Store" arrows after downgrade - https://discussions.apple.com/thread/4567064

  • I'm about to transfer the contents of my existing HDD in my (dead PSU) iMac to another computer. I'm just wanting to know if and how I will be able to access my files and documents from the old hard drive once I've made the backup?

    I'm about to transfer the contents of my existing HDD in my (dead PSU) iMac to another computer. I'm just wanting to know if and how I will be able to access my files and documents from the old hard drive once I've made the backup?

    You are not going to be able to run your old system from the backup on this old computer as the hardware is incompatible.
    You need to get a new computer or a refurbished one.

  • When i look at how much hard drive space i have available, my mac says i have 250 gigs used up in backup.  I can not find this backup file to delete it and free up the space

    When i look at how much hard drive space i have available, my mac says i have 250 gigs used up in backup.  I can not find this backup file to delete it and free up the space

    OmniDiskSweeper is a free utility that checks HD space.
    FreeSpace cost $1 or is a free utility that checks HD space.
    SpaceControl is a free utility that checks HD space.

  • I have transferred my itunes library to an external drive. I then attached the external disk to a new computer. I can now access all songs from the new computer. But I can't access playlists. I can still  access all songs and playlists on the old computer

    I have transferred my itunes library to an external drive. I then attached the external disk to a new computer. I can now access all songs from the new computer. But I can't access playlists. I can still  access all songs and playlists on the old computer

    If you right mouse and select Get info it will show you the Apple ID used to purchase these songs.
    Usually the name of an apple id is based on the email. So knowing that you may have forgotten the Apple ID password.
    You can request a new password here http://www.apple.com/support/appleid/

  • What is the best way to have access to OSX and OS9 from the same machine?

    What is the best way to have access to OSX and OS9 from the same machine?
    Do I need to partition the hard drive? Installed both Tiger and OS 9 on the G5 and it is having problems starting up properly.
    G5   Mac OS X (10.4)  

    And here is the prove for Edwin's message: Macintosh: Some Computers Only Start Up in Mac OS X

  • Is it possible to change an IDOC and save on the same IDOC number..?

    Hi all,
    I have an IDOC. When I processed the IDOC, it ended up with error status '51'. There was some problem with the data. So, I changed the data and reprocessed using the T-Code 'WE19' and it was processed successfully. When we reprocess the IDOC using 'WE19', it generates another IDOC number. But, the client is asking that, it should not generate another IDOC number. When we change the IDOC number, it should be saved under the same(ORIGINAL) IDOC number. Is it possible to change an IDOC and save under the same number..? Is there any transaction code to do so. Please give your valuable inputs.
    Thanks in advance.
    Thanks & regards,
    Paddu.

    Hi,
    You can use the transaction WE09..to edit the IDOC data...
    Then use the transaction BD87 to post the IDOC..
    Thanks
    Naren

  • I have downloaded AI Trial but am getting a Configuration Error as follows 'A problem has occured with the licensing of this product. Restart your computer and re-launch the product.  If this problem still occurs after restarting, contact Customer Support

    I have downloaded AI Trial but on launching I am getting a Configuration Error which reads '
    A problem has occured with the licensing of this product. Restart your computer and re-launch the product.
    If this problem still occurs after restarting, contact Customer Support for further assistance, and mention the error code shown at the bottom of this screen.
    Error: 213:5.
    I have tried the restart suggestion, but the problem persists.
    Can anyone assist.
    TIm

    Tim,
    This may be one for this specialized forum (where you may be able find the answer from previous threads),
    http://forums.adobe.com/community/download_install_setup
    or for a chat,
    Creative Cloud support (all Creative Cloud customer service issues, chat open between 5AM and 7PM PST/PDT on workdays)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html
    or for Adobe phone Support,
    http://helpx.adobe.com/adobe-connect/adobe-connect-phone-numbers.html

  • HT4623 This really ***** that they sent out and update to the iPhone ISO6 and I can't send or receive pics! Being that its apple you would think they would know better than to send out a bad update like this! I'm paying for a service and I can even use it

    This really ***** that they sent out and update to the iPhone ISO6 and I can't send or receive pics! Being that its apple you would think they would know better than to send out a bad update like this! I'm paying for a service and I can even use now!!! I'm very upset! Think about canceling my iPhone 5 order! This is terrible!

    Wahhhhhhhhhh! Wahhhhhhhhhh!
    Are you over your little tantrum now?  Do you want help you would like to continue to act like a toddler?
    If you want help, try telling us what happens when trying to send pics.  Any errors?
    If you want to whine... go somewhere else.

  • In imovie 11, with an iMac, latest Mountain Lion, sometimes I insert a still and when I playback, the previous image freezes the last frame and holds during the duration I set for the still, skips both transitions, and jumps to the next clip. why?

    in imovie 11, with an iMac, latest Mountain Lion, sometimes I insert a still and when I playback, the previous image freezes the last frame and holds during the duration I set for the still, skips both transitions, and jumps to the next clip. why?

    in imovie 11, with an iMac, latest Mountain Lion, sometimes I insert a still and when I playback, the previous image freezes the last frame and holds during the duration I set for the still, skips both transitions, and jumps to the next clip. why?

  • I bought a MacBook Air and wish to connect with old iMac 2003-5. The screen on the iMac is black. Can anyone tell me the cable I need to do this please. I have music and photos on the iMac I cannot access. Many thanks. Jax

    I bought a MacBook Air and wish to communicate with old iMac G5 2003-5 (sorry can't remember the year). The screen on the iMac is blank and will not come on but the hard drive still works. Can anyone tell me the cable I need to with the iMac & how to do it. I have music and photos on the iMac I cannot access.
    Also, do I need to special CD/DVD external drive/burner to import music CD's into iTunes? I have tried and it keeps coming up with formatting problems.
    Many thanks. Jax

    dwb
    I have looked for what you said and come up with these 2 cables. Are these the correct ones I need?
    http://store.apple.com/us/product/HA833ZM/A/belkin-firewire-800400-9-pin6-pin-ca ble-2-m66-ft?fnode=51&fs=s%3DpriceLH
    http://www.tekserve.com/store/networking-cables-adapters/cables-adapters/apple-t hunderbolt-to-firewire-adapter.html
    Many tx again.
    JAx

Maybe you are looking for

  • Can't move emails from one account to another in native Mail app IOS 7.0.3

    I can select an email and click on move, and MAIL looks like working (the animation seems to move the email to a different account folder) but indeed is not moving the email! This was working with the previous release of IOS Mail works if I try to mo

  • Help! My iPod nano just keeps shuffling thru my music

    iPod nano won't play anything. Just shuffles. I've tried a rest & a restore to factory settings, but, nothing seems to be working. Any & all suggestions will be greatly appreciated!  Thanx. Annie

  • Way to Capture Pre-Test Score?

    Hi all - We're using OLM 11.5.10j and want to have a pre-test that, if passed, exempts you from needing to complete the course with which it's associated, and would also mark the overall course as complete. If the learner doesn't pass the pre-test, t

  • NavigateToURL doesn't bring FireFox window to the front

    Just wondering if this is a bug that's likely to get fixed anytime soon.   Or is there something inherintely blocking it from working like something that would have to change in windows or firefox to make it work.   I'm only asking because I was goin

  • InDesign Not Opening

    InDesign will not open.  It was working fine yesterday and now I can't even open it.  All of my indd. documents have renamed as illustrator docs. and come up with an error.