A script that captures the coordinates of the mouse clicks and saves them into a file

Hello,
I'm trying to create a cartoon taking a movie (I've chosen blade runner) as base. I've got the real movie and I've exported all the pictures using VirtualDUB. Now I have a lot of images to modify. I would like to modify the actors faces with the faces generated by Facegen modeller. I'm thinking how to make the whole process automatic because I have a lot of images to manage. I've chosen to use Automate BPA,because it seems the best for this matter. I'm a newbie,so this is my first attempt using Adobe Photoshop and Automate BPA. I wrote a little script. It takes a face generated with Facegen modeller and tries to put it above the original actors faces. But it doesn't work very good and I'm not really satisfied,because the process is not fully automated. To save some time I need to write a script that captures the coordinates of the mouse when I click over the faces and that saves them into a file,so that Automate BPA can read these coordinates from that file and can put the face generated with Facegen Modeller above the original face. I think that Automate BPA is not good for this matter. I think that two coordinates are enough,X and Y. They can be the coordinates of the nose,because it is always in the middle of every face. It is relevant to knows how big should be the layer of the new face,too. This is the Automate BPA code that I wrote :
<AMVARIABLE NAME="nome_foto" TYPE="TEXT"></AMVARIABLE>
<AMVARIABLE NAME="estensione_foto" TYPE="TEXT"></AMVARIABLE>
<AMSET VARIABLENAME="nome_foto">br</AMSET>
<AMSET VARIABLENAME="estensione_foto">.jpeg</AMSET>
<AMVARIABLE NAME="numero_foto" TYPE="NUMBER"></AMVARIABLE>
<AMVARIABLE NAME="coord_x" TYPE="NUMBER"></AMVARIABLE>
<AMVARIABLE NAME="coord_y" TYPE="NUMBER"></AMVARIABLE>
<AMWINDOWMINIMIZE WINDOWTITLE="Aggiungere_layer - AutoMate BPA Agent
Task Builder" />
<AMWINDOWMINIMIZE WINDOWTITLE="AutoMate BPA Server Management Console
- localhost (Administrator)" AM_ONERROR="CONTINUE" />
<AMENDPROCESS PROCESS="E:\Programmi_\Adobe Photoshop
CS5\Photoshop.exe" AM_ONERROR="CONTINUE" />
<AMRUN FILE="%&quot;E:\Programmi_\Adobe Photoshop CS5\Photoshop.exe&quot;%" />
<AMPAUSE ACTION="waitfor" SCALAR="15" />
<AMSENDKEY>{CTRL}o</AMSENDKEY>
<AMPAUSE ACTION="waitfor" SCALAR="1" />
<AMINPUTBOX RESULTVARIABLE="numero_foto">Inserire numero FOTO di
partenza -1</AMINPUTBOX>
<AMINCREMENTVARIABLE RESULTVARIABLE="numero_foto" />
<AMPAUSE ACTION="waitfor" SCALAR="1" />
<AMMOUSEMOVEOBJECT WINDOWTITLE="Apri" OBJECTNAME="%nome_foto &amp;
numero_foto &amp; estensione_foto%" OBJECTCLASS="SysListView32"
OBJECTTYPE="ListItem" CHECKOBJECTNAME="YES" CHECKOBJECTCLASS="YES"
CHECKOBJECTTYPE="YES" />
<AMMOUSECLICK CLICK="double" />
<AMPAUSE ACTION="waitfor" SCALAR="10" />
<AMSENDKEY>{CTRL}+</AMSENDKEY>
<AMPAUSE ACTION="waitfor" SCALAR="20" />
<AMSENDKEY>l</AMSENDKEY>
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSEMOVE MOVEX="429" MOVEY="281" RELATIVETO="screen" />
<AMMOUSECLICK />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSEMOVE MOVEX="659" MOVEY="281" RELATIVETO="screen" />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSECLICK />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSEMOVE MOVEX="659" MOVEY="546" RELATIVETO="screen" />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSECLICK />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSEMOVE MOVEX="429" MOVEY="546" RELATIVETO="screen" />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSECLICK />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSEMOVE MOVEX="429" MOVEY="281" RELATIVETO="screen" />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSECLICK />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMSENDKEY>v</AMSENDKEY>
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSECLICK CLICK="hold_down" />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSEMOVE MOVEX="131" MOVEY="99" RELATIVETO="screen" />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSEMOVE MOVEX="99" MOVEY="162" RELATIVETO="screen" />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMMOUSECLICK CLICK="release" />
<AMPAUSE ACTION="waitfor" SCALAR="2" />
<AMINPUTBOX RESULTVARIABLE="coord_x">Inserire coordinata X</AMINPUTBOX>
<AMINPUTBOX RESULTVARIABLE="coord_y">Inserire coordinata Y</AMINPUTBOX>
<AMMOUSEMOVE MOVEX="200" MOVEY="200" RELATIVETO="screen" />
<AMMOUSECLICK CLICK="hold_down" />
<AMMOUSEMOVE MOVEX="%coord_x%" MOVEY="%coord_y%" RELATIVETO="position" />
<AMMOUSECLICK />
and this is a short video to explain better what I want to do :
http://www.flickr.com/photos/26687972@N03/5331705934/
In the last scene of the video you will see the script asking to input the X and the Y coordinates of the nose. This request is time consuming. For this reason I want to write a script that captures automatically the coordinates of the mouse clicks. The only thing to do should be click over the nose and the script should make the rest. As "c.pfaffenbichler" suggested here : http://forums.adobe.com/thread/775219, I could explore 3 ways :
1) use the Color Sampler Tool’s input with a conventional Photoshop Script.
2) use After Effects would provide a better solution.
3) Photoshop’s Animation Panel might also offer some easier way as it might be possible to load two movies (or one movie and one image) and animate the one with the rendered head in relation to the other.
Since I'm a totally newbie in graphic and animation,could you help me to explore these ways ? Thanks for your cooperation.

These are the coordinates of the contours of the face that you see on the picture. Can you explain to me how they are calculated ? The coordinates of the first colums are intuitive,but I'm not able to understand how are calculated the coordinates of the second one.
Thanks.
1 COL     2 COL (how are calculated these values ?)
307.5000 182.0000 m
312.5000 192.0000 l
321.5000 194.0000 l
330.5000 193.0000 l
335.0000 187.0000 l
337.0000 180.5000 l
340.0000 174.0000 l
338.5000 165.5000 l
336.0000 159.0000 l
331.5000 153.0000 l
324.5000 150.0000 l
317.0000 154.0000 l
312.5000 161.0000 l
309.0000 173.0000 l
307.5000 182.0000 l
Message was edited by: LaoMar

Similar Messages

  • I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??

    I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??

    1-800-676-2775  apple support   tech support 1 800 275 2273
    If your computer is on one minute before it freezes, than you have one minute to secure your serial number.
    click the apple----->click about this Mac ------> click on version----> until you see the serial number.  You may have to do this a couple of times if it freezes before you have all the numbers.  A camera might help.
    Good Luck

  • How to find the coordinates of a mouse click in a Tree node ?

    Hello
    I have a JTree that have few nodes. The nodes contain an icon and a label (using custom cell renderer) and I want to receive right clicks on the icon and show a popup menu.
    The problem is I can only get the right click on the whole tree node, not only the icon.
    I tried two approaches:
    1. register the mouse listener directly with the icon in the cell renderer. That doesnt work since the events received by the tree node do not propagate to its sub-components.
    2. Register the event with the JTree itself and then try to find which part of the tree node was clicked (see if it was within the coordinates of the icon).
    But I cant get the node's coordinates or width.
    I tried using SwingUtilities.convertPoint or SwingUtilities.ConvertMouseEvent but it just doesnt work with DefaultMutableTreeNode.
    Any ideas how to do it ?

    user11973359 wrote:
    1. register the mouse listener directly with the icon in the cell renderer. That doesnt work since the events received by the tree node do not propagate to its sub-components.No, it doesn't work because a renderer isn't added to any component hierarchy. It isn't in any way a 'sub-component'.
    Read about editor and renderer concepts in the Oracle tutorial on How to Use Tables.
    user11973359 wrote:
    2. Register the event with the JTree itself and then try to find which part of the tree node was clicked (see if it was within the coordinates of the icon).
    But I cant get the node's coordinates or width.<tt>getPathForLocation(...) </tt>in conjunction with<tt> getPathBounds(...)</tt>.
    db

  • Is there how to download music directally from the ipod and save them into the ipod's library?

    I don't want apps like music download pro, download lite...

    For non-iTunes purchased music you need a third-party program like one of those discussed here:
    Copy music from Ipod to new computer...: Apple Support Communities
    For iTunes purchases:
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer

  • Catch the image of JTree and save it as a file

    There is an JTree and it has a few nodes.
    And there, I want to capture both the image of JTree and
    the images of it's child nodes as they show in screen.
    if possible, I want to capture image of all expanded nodes in tree and
    save them as jpg file.
    I try to capture the Image of JTree from JTree.createImage() method.
    and I also tried to capture the images of child nodes
    from JTree.getComponents() and capture images all of child nodes as they were.
    I,however,get to know the method
    Component.createImage() doesn't return the image that shows in screen as it was.
    could anybody tell me the answer?

    Hi,
    don't know if I got you right, but what you want is a "screenshot" of the JTree, right ?
    Try to paint the JTree in a BufferedImage and encode this as JPEG or whatever.
    BufferedImage theImage = new BufferedImage(
          owner.getWidth(), owner.getHeight(), BufferedImage.TYPE_INT_RGB);
          Graphics g = theImage.createGraphics();
          g.setClip( 0, 0, owner.getWidth(), owner.getHeight());
          owner.paint( g);owner is your JTree or any other component you want.
    Hope that helped.

  • Hello,  Is there a script that I can change all the colors of a layer in to 1 PMS color, unite every object and than give it an offset of -0,2 mm ?

    Hello,
    Is there a script that I can change all the colors of a layer in to 1 PMS color, unite every object and than give it an offset of -0,2 mm ?

    the offset has to be semi-automatic, apply an Offset Path Effect (by hand), create a Graphic Style out of it (by hand), then the script can apply this graphic style to objects.

  • Oracle script that was used to confirm the web services working????

    I am having major problems with the top 2 web servers and top 3 app servers, which would be the cluster facing our external customers. This is how our our web services are deployed. I used an oracle script that was used to confirm the web services worked when I installed this working with the oracle consultant taken from metalink. I simply edited it for our web services.
    Can’t deploy web services. Using a script. 2 work on 2 of the machines. Doesn't always work on third machines. Third web service doesn't work on any of the machines.
    Please help, Thank you

    Please can you provide more information, its really not much to work with when u just my web server is not working. any log files ...error messages ?

  • Find the coordinate of the transformation anchorpoint of a pageitem

    hi
    i developp an extension for indesign with CS extension builder 2 and flashbuilder 4.6 and i dont find the coordinate of the transformation anchorpoint of a pageitem. Where can i find this property ?
    thanks
    simon

    I moved this discussion to the scripting forum because it's not an SDK question.

  • I got some books from the itunes store and put them into my library.  I created a playlist so that I could burn them to cds.  The title is there but no contents.  It won't even play the playlist.  How do I get the contents of the book?

    I got some books from the itunes store and put them into my library.  I created a playlist so that I could burn them to cds.  It won't even play the book, there are no contents.  How do I get the contents of the book?

    I'm guessing this is a problem unique to me as there have been no replies at all...  Thanks a bunch folks

  • I would like to copy my iPhoto (9.4.1) library from my Mac Pro (10.7.5) to a Macbook Pro (10.7.5). Can I drag the iPhoto Library to Air Drop and send them to the MacBook? Will that then be a usable iPhoto library on the Macbook?

    I would like to copy my iPhoto (9.4.1) library from my Mac Pro (10.7.5) to a Macbook Pro (10.7.5). Can I drag the iPhoto Library from the Pictures folder to Air Drop and send them to the MacBook? If I then move that to the Pictures folder on the MacBook will that then be a usable iPhoto library on the Macbook?

    It would be better if you could connect the two Macs via a hard wired LAN to copy the library from the Mac Pro to the MacBook.  Wireless connections can have momentary dropouts which could affect the reliable copying of files. 
    If you do go with Air Drop be sure to open and inspect the copied library closely to confirm it was a successulf copy.
    OT

  • I have photos on my iphone 4 that i'm trying to transfer to iphoto.  The problem is when I plug the phone in, it only wants to transfer the new photos, not all.  How can I take all the photos off my phone and put them into iphoto?

    I have photos on my iphone 4 that i'm trying to transfer to iphoto.  The problem is when I plug the phone in, it only wants to transfer the new photos, not all.  How can I take all the photos off my phone and put them into iphoto? Even if there are duplicates, I'd like to make sure I get all the photos from my phone into iphoto.  Thanks

    To see all the photos on the phone, including photos that have already been imported into iPhoto, deselect the "Hide Photos Already Imported" checkbox. If the camera contains photos that have already been imported into iPhoto, those photos are hidden by default.

  • How do I get the coordinates of the text block (TextFrame) help me please!

    Dim myApp As New Illustrator.Application
    Dim myDoc As Illustrator.Document
    myDoc = myApp.ActiveDocument
    Dim textRef = myDoc.TextFrames.Add
    For Each ArtPageItems In myDoc.PageItems
    If TypeName(ArtPageItems) = "TextFrame" Then
    '========It is necessary to obtain the coordinates of the text block and move closer to the object (ie the text)============
    Else
    End If
    Next

    Hi Todd, you're welcome, please explain better, I don't understand the question.
    are you trying to "move" a textframe (Dim textRef = myDoc.TextFrames.Add) closer to other text frames? or do you want to "zoom" to this textframe?

  • I want to know the coordinates of the mouse

    I want to know the coordinates of the mouse when the mouse is outside my application?

    Hi,
    No, it is not possible... In order for a MouseListener to know when the mouse exited a component, it first needs to know the position of the application's GUI on the screen and also position of the cursor on the screen.
    But in JDK 1.5 we have an option java.awt.MouseInfo.getPo..(); to get current mouse possition.
    regards
    Dhina

  • I have problems with my films that become slightly jerky after I have imported and edited them in iMovie and then burned them onto a DVD using iDVD. I can see the weak jerkiness when panning in both laterally and vertically. I shoot with a camcorder Canon

    I have problems with my films that become slightly jerky after I have imported
    and edited them in iMovie and then burned them onto a DVD using iDVD.
    I can see the weak jerkiness when panning in both laterally
    and vertically.
    I shoot with a camcorder Canon Vixia HF10. The camera has been set to deliver HD quality (1920x1080). But I have accidentally filmed with a frame rate of 60 (?).
    When I import the films in iMovie I have been asked if I want to change to frame rate 30 (instead of 25). I have chosen 30.
    Could it be the setting of a frame rate 60 in my camcorder that causes jerkiness when panning or what else?

    I have problems with my films that become slightly jerky after I have imported
    and edited them in iMovie and then burned them onto a DVD using iDVD.
    I can see the weak jerkiness when panning in both laterally
    and vertically.
    I shoot with a camcorder Canon Vixia HF10. The camera has been set to deliver HD quality (1920x1080). But I have accidentally filmed with a frame rate of 60 (?).
    When I import the films in iMovie I have been asked if I want to change to frame rate 30 (instead of 25). I have chosen 30.
    Could it be the setting of a frame rate 60 in my camcorder that causes jerkiness when panning or what else?

  • I have old video clips in Photoshop Elements Organizer v12 for Mac.  I want to divide some of those clips in Organizer.  I can do that in Premiere Elements 12 and save them as "Projects" - but how do I get the divided clips back into Organizer?

    I have old video clips in Photoshop Elements Organizer v12 for Mac.  I want to divide some of those single clips into 2 or 3 separate clips, each shown separately in Organizer.  I can divide the clips in Premiere Elements Editor 12 and save them as "Projects" - but I can't find any way to get those divided clips back into Organizer.  Does anyone know whether that can be done?  Many thanks for your thoughts.

    What about Google Drive? And just share the folder with the family members.
    Erick

Maybe you are looking for

  • Invoke-WebRequest - Double byte characters issue in windows 8.1

    I try write a powershell script to download a file from web server but failed. The path have double byte characters. I could run in Windows server 2012 and 2012 R2 successfully, but fail in Windows 8 & 8.1 Do there any difference below Windows server

  • Converting Double to Specific Format.!!!!!!

    Hi, I have a requirement to convert the double to a speicfic pattern. Example: Double: 1222.23 ----> if i input Mantissa=13 decimal=2 then i want to append zeros before the Mantissa and after decimal a) input : Double: 1222.23 if i input Mantissa=13

  • Tax code C0 for country IN has been deleted or incorrectly changed

    Dear All While making incoming payment in F-06 am getting an error (Tax code C0 for country IN has been deleted or incorrectly changed) Plz give me the solution. regds raj

  • ERROR: Release '640' is not supported by this tool!

    Hi, i'm trying to upgrade system SAP ERP 5.0 to SAP ERP 6.0 EHP 4 and i got problem with EHP installer, 1. I readed and made all the steps as described in Upgrade guide 2. Downloaded EHP installer version 7.00 (but when it starts shows me on screen v

  • Nasty black borders around clicked items

    I am suddenly getting nasty black borders around file names I click on (and not just in the finder). Although ugly I would be able to live with if it wasn't for the fact that they can remain on the screen. It looks like corruption. Does anyone have a