Peg Hole Recognition
Peg Hole Recognition
Hi there,
is there something comparable with the automatic peg hole recognition of auto feed scanned images in TvPaint Pro we know and love from Toonboom, Animo or Toonz for example?
I've searched the forum and found a hint to the 2 point stabilization FX, but didn't got good results. I also didn't got an idea of using this effect in a sinful way? Do I really have to correct every frame with that stabilization points? What are the advantages in this case of using that FX instead of transforming every frame with help of the light table function? Maybe someone can give me an idea of a good and fast workflow for correction the position of scanned images with peg holes.
Thanks a lot from Animark.
is there something comparable with the automatic peg hole recognition of auto feed scanned images in TvPaint Pro we know and love from Toonboom, Animo or Toonz for example?
I've searched the forum and found a hint to the 2 point stabilization FX, but didn't got good results. I also didn't got an idea of using this effect in a sinful way? Do I really have to correct every frame with that stabilization points? What are the advantages in this case of using that FX instead of transforming every frame with help of the light table function? Maybe someone can give me an idea of a good and fast workflow for correction the position of scanned images with peg holes.
Thanks a lot from Animark.
TVPaint 10.5.7 - Win10/64
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
Re: Peg Hole Recognition
no, you can use the pixel tracker.Do I really have to correct every frame with that stabilization points?
Fabrice Debarge
Re: Peg Hole Recognition
I used registration marks which I drew with a very fine marker on clear tape glued to the glass of the flatbed scanner. These marks are sharp enough to get recognized by the pixeltracker. I also fixed a peg bar on the scanner.
My scan plugin (Epson, in Photoshop - quite clumsy, like most) remembers the scan window position, so the registration marks are not really necessary.
My scan plugin (Epson, in Photoshop - quite clumsy, like most) remembers the scan window position, so the registration marks are not really necessary.
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
Re: Peg Hole Recognition
Hi Slowtiger,
the problems comes with the automatic document feeder. It "shakes" the sheets a little bit while scanning and they lose their registration a little bit. So it dont helps to glue some registration marks on the flatbed. I only have the scanned peg-holes to track to. I will test the pixeltracker FX but it`s probably a better way to scan with animo an import the pictures. I know that than I will have the problem with the numbering of the sheets, cause the numbering don`t count the sheets. The numbering marks the frames when a drawing is used in the xsheet.
the problems comes with the automatic document feeder. It "shakes" the sheets a little bit while scanning and they lose their registration a little bit. So it dont helps to glue some registration marks on the flatbed. I only have the scanned peg-holes to track to. I will test the pixeltracker FX but it`s probably a better way to scan with animo an import the pictures. I know that than I will have the problem with the numbering of the sheets, cause the numbering don`t count the sheets. The numbering marks the frames when a drawing is used in the xsheet.
TVPaint 10.5.7 - Win10/64
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
Re: Peg Hole Recognition
So you are scanning the whole sheet complete with pegholes, I assume?
Maybe it's enough to increase the contrast between peg hole and paper. If that's possible, paste a small strip of black paper on the lid of the scanner in the area of the peg holes. You'll get a nice black circle in teh scans which should be useful for the pixelracker.
But if the whole lid is covered by the conveyer belt for the automatic document feed, I don't know another trick ... except colouring the belt. In that case the crosshair registration marks have to be drawn on paper.
Maybe it's enough to increase the contrast between peg hole and paper. If that's possible, paste a small strip of black paper on the lid of the scanner in the area of the peg holes. You'll get a nice black circle in teh scans which should be useful for the pixelracker.
But if the whole lid is covered by the conveyer belt for the automatic document feed, I don't know another trick ... except colouring the belt. In that case the crosshair registration marks have to be drawn on paper.
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
Re: Peg Hole Recognition
Ah, OK, I have to ask more precise:
I have the holes on the scan. I know the tricks with black tape and/or black edding.
I am asking for a function (button) like this: "TVPaint, please find the holes on my scans and adjust all frames that the holes fit to eachother."
I think the pixeltracker is the right way, but it seems to be a handwork process so that the advantages of the document feeder scanning (speed) get lost.
I have to try it out.
I have the holes on the scan. I know the tricks with black tape and/or black edding.
I am asking for a function (button) like this: "TVPaint, please find the holes on my scans and adjust all frames that the holes fit to eachother."
I think the pixeltracker is the right way, but it seems to be a handwork process so that the advantages of the document feeder scanning (speed) get lost.
I have to try it out.
TVPaint 10.5.7 - Win10/64
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
Re: Peg Hole Recognition
I just tried the pixeltracker myself, and it's not really easy to understand since the manual is a bit ... uhm ... secretive about how to exactly use it.
You need:
- the pixeltracker panel (under windows menu)
- the coordinates panel (in the toolbar on top)
- the FX stack with the 2 point stabilization
- your anim layer with the drawings to be adjusted. (I always duplicate this before I start, in case of major fuck up.)
The first thing you need to set in the pixeltracker is the Ref X/Y, which is the current location of a peg hole. This is where the coordinates panel helps: I locate the mouse over the peg hole, read the values, and write them into the pixeltracker. In the small preview window you should see the red crosshair centered on your peg hole. When you now click "set tracker", the "tracker" will appear in the main window.
The next four lines set the area where the pixeltracker will search for another peg hole. Bigger numbers = greater area.
Use "Dynamic" since your peg holes will be in different places. The accuracy will be more precise with higher numbers.
Now hit "track". It will search and record all positions in the layer. When it's finished, it asks you for a name for your track ("Track 1", or something better.)
Go back to frame 1 and repeat this for the second peg hole. Now 2 motion paths are stored as "trackers". You'll find them in the Path Manager panel, this is where you have to delete them afterwards.
Open the FX stack with Stabilization 2 points. Under Origin1, Tools choose your first tracker from Copy from path bin. This will create a key for every frame of the layer. Do the same for Origin2.
(--- At this point I'm not sure about when and where to create keyframes. It seems this works best with setting only one key in the first frame for destination.)
Set the destination points by typing in a value you got from coordinates (helps to have one image layer visible with the desired position of pegs!) Be sure to check rotation only. select the whole layer and hit apply.
You need:
- the pixeltracker panel (under windows menu)
- the coordinates panel (in the toolbar on top)
- the FX stack with the 2 point stabilization
- your anim layer with the drawings to be adjusted. (I always duplicate this before I start, in case of major fuck up.)
The first thing you need to set in the pixeltracker is the Ref X/Y, which is the current location of a peg hole. This is where the coordinates panel helps: I locate the mouse over the peg hole, read the values, and write them into the pixeltracker. In the small preview window you should see the red crosshair centered on your peg hole. When you now click "set tracker", the "tracker" will appear in the main window.
The next four lines set the area where the pixeltracker will search for another peg hole. Bigger numbers = greater area.
Use "Dynamic" since your peg holes will be in different places. The accuracy will be more precise with higher numbers.
Now hit "track". It will search and record all positions in the layer. When it's finished, it asks you for a name for your track ("Track 1", or something better.)
Go back to frame 1 and repeat this for the second peg hole. Now 2 motion paths are stored as "trackers". You'll find them in the Path Manager panel, this is where you have to delete them afterwards.
Open the FX stack with Stabilization 2 points. Under Origin1, Tools choose your first tracker from Copy from path bin. This will create a key for every frame of the layer. Do the same for Origin2.
(--- At this point I'm not sure about when and where to create keyframes. It seems this works best with setting only one key in the first frame for destination.)
Set the destination points by typing in a value you got from coordinates (helps to have one image layer visible with the desired position of pegs!) Be sure to check rotation only. select the whole layer and hit apply.
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
Re: Peg Hole Recognition
Uh, that's seems to be a long way to go.
Many thanks for this "tutorial", I will test it on monday, when I am back at school.
Many thanks for this "tutorial", I will test it on monday, when I am back at school.
TVPaint 10.5.7 - Win10/64
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
- D.T. Nethery
- Posts: 4225
- Joined: 27 Sep 2006, 19:19
Re: Peg Hole Recognition
Animark wrote:Ah, OK, I have to ask more precise:
I have the holes on the scan. I know the tricks with black tape and/or black edding.
I am asking for a function (button) like this: "TVPaint, please find the holes on my scans and adjust all frames that the holes fit to eachother."
I think the pixeltracker is the right way, but it seems to be a handwork process so that the advantages of the document feeder scanning (speed) get lost.
I have to try it out.
Yes, the pixeltracker with the 2-point stabilization is the way to go. I've done it and it works, but it can be a rather mysterious and "secretive" process as SlowTiger mentions .
I would love to see an Animo or Digicel Flipbook type of Auto-Recognition and Auto Register of peg holes integrated in a future release of TVP.
(there is the shareware product called ScanFix which works fairly well , though it is tempermental, but it would be so much better to have a native Auto Peg Registration in TVP that didn't take as many steps as the present 2-Point Stabilization and PixelTracker process)
SlowTiger gave a very clear explanation of the process.
And he's quite correct: for an auto-document feed scanner use a strip of black tape or exeter paper on the lid or along the roller area of the auto-feed scanner to get DARK , crisp scans of the peg hole shapes :
slowtiger wrote: paste a small strip of black paper on the lid of the scanner in the area of the peg holes. You'll get a nice black circle in the scans which should be useful for the pixelracker.
But if the whole lid is covered by the conveyer belt for the automatic document feed, I don't know another trick ... except colouring the belt. In that case the crosshair registration marks have to be drawn on paper.
------------
slowtiger wrote:I just tried the pixeltracker myself, and it's not really easy to understand since the manual is a bit ... uhm ... secretive about how to exactly use it.
You need:
- the pixeltracker panel (under windows menu)
- the coordinates panel (in the toolbar on top)
- the FX stack with the 2 point stabilization
- your anim layer with the drawings to be adjusted. (I always duplicate this before I start, in case of major fuck up.)
The first thing you need to set in the pixeltracker is the Ref X/Y, which is the current location of a peg hole. This is where the coordinates panel helps: I locate the mouse over the peg hole, read the values, and write them into the pixeltracker. In the small preview window you should see the red crosshair centered on your peg hole. When you now click "set tracker", the "tracker" will appear in the main window.
The next four lines set the area where the pixeltracker will search for another peg hole. Bigger numbers = greater area.
Use "Dynamic" since your peg holes will be in different places. The accuracy will be more precise with higher numbers.
Now hit "track". It will search and record all positions in the layer. When it's finished, it asks you for a name for your track ("Track 1", or something better.)
Go back to frame 1 and repeat this for the second peg hole. Now 2 motion paths are stored as "trackers". You'll find them in the Path Manager panel, this is where you have to delete them afterwards.
Open the FX stack with Stabilization 2 points. Under Origin1, Tools choose your first tracker from Copy from path bin. This will create a key for every frame of the layer. Do the same for Origin2.
(--- At this point I'm not sure about when and where to create keyframes. It seems this works best with setting only one key in the first frame for destination.)
Set the destination points by typing in a value you got from coordinates (helps to have one image layer visible with the desired position of pegs!) Be sure to check rotation only. select the whole layer and hit apply.
Re: Peg Hole Recognition
A tutorial about tracking and stabilization is necessary I think.
I will add it in the "to do" list.
I will add it in the "to do" list.
Fabrice Debarge
Re: Peg Hole Recognition
I could say something about the whole process ... but I will restrict myself to only one point today.
If the 2-point-stabilization is meant to work together with the pixeltracker: why, of all possible values, does it have a completely unuseable default setting for the origin and destination points? My understanding of a default setting is that it should reflect the current state, in this case the first pair of positions from the pixeltracker. At least it should have a setting which doesn't scale the artwork. The way it is set up right now I have to spend a lot of valueable time just to get the artwork back to 100%.
If the 2-point-stabilization is meant to work together with the pixeltracker: why, of all possible values, does it have a completely unuseable default setting for the origin and destination points? My understanding of a default setting is that it should reflect the current state, in this case the first pair of positions from the pixeltracker. At least it should have a setting which doesn't scale the artwork. The way it is set up right now I have to spend a lot of valueable time just to get the artwork back to 100%.
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
Re: Peg Hole Recognition
If we can improve the default settings, we will doslowtiger wrote:I could say something about the whole process ... but I will restrict myself to only one point today.
If the 2-point-stabilization is meant to work together with the pixeltracker: why, of all possible values, does it have a completely unuseable default setting for the origin and destination points? My understanding of a default setting is that it should reflect the current state, in this case the first pair of positions from the pixeltracker. At least it should have a setting which doesn't scale the artwork. The way it is set up right now I have to spend a lot of valueable time just to get the artwork back to 100%.
Fabrice Debarge
Re: Peg Hole Recognition
Whow! I did it.
Slowtigers workflow works fine for me. Thanks a lot!
I decided to use a pixel at the border of the peghole, not the center. I don't know how the pixeltracker find the pixels and I thought its easier for it to find a grey pixel at the border than a black one of the middle of the peghole. Next time I will test it out, if the settings of one scan procedure are reusable for another scan procedure. The pegholes are allways located in the same area.
But after all its much more complicated than just checking a box to find the pegholes and registrate to eachother.
Slowtigers workflow works fine for me. Thanks a lot!
I decided to use a pixel at the border of the peghole, not the center. I don't know how the pixeltracker find the pixels and I thought its easier for it to find a grey pixel at the border than a black one of the middle of the peghole. Next time I will test it out, if the settings of one scan procedure are reusable for another scan procedure. The pegholes are allways located in the same area.
But after all its much more complicated than just checking a box to find the pegholes and registrate to eachother.
TVPaint 10.5.7 - Win10/64
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
TVPaint 11.0.8 - Win10/64
TVPaint 11.0.8 - Win10/64 (Wacom Companion 2)
- D.T. Nethery
- Posts: 4225
- Joined: 27 Sep 2006, 19:19
Re: Peg Hole Recognition
Revisiting the topic of Peg Hole Registration in TVP :
I am in the process of creating a tutorial for my students on how to use the 2-Point Stabilization FX to lock down peg holes on drawings that have been scanned off-pegs.
(I usually encourage students to scan on-pegs , but some prefer to scan off-pegs because it's a bit faster when scanning on a flatbed and of course is MUCH faster when running drawings through an Auto-Document Feed scanner.) Since I remembered this discussion thread I thought I'd put up an example of a test I did to show how 2-Point Stabilization works for peg hole alignment.
Today as a test I took a photocopied scene I have had in my collection for many years. The original photocopies were made off-pegs and the peg holes on the copies are shifting around a lot. In addition the peg holes had photocopied somewhat lightly, so on some drawings the holes were not very clear.
I scanned the photocopies, then loaded them into TVP. I used Scan Cleaner to make the drawings and the peg holes darker. Then I used the Pixel Tracker and 2-Point Stabilization to track the two outer peg hole shapes (the two oblong shapes) and here are the results :
Notice that the peg holes are now quite steady. There is a bit of residual jitter around the peg holes which is from artifacts on the original photocopies and the fact that the photocopying process also introduced some slight distortion into the peg holes, but overall the results are very solid. (on the originals the peg holes jerked and jittered noticeably) Of the several tests I made I had better results using the two outer (oblong) peg holes rather than using one oblong and the round center peg hole.
I will be using an original scene for the tutorial, but I wanted to try registering a poorly scanned , "worst case" example of peg holes that were not in good shape to begin with. This took a bit of extra tweaking using Scan Cleaner and Curves (alpha) to darken the peg holes , but the process is faster and easier when using original drawings where the image quality can be controlled better to begin with. It helps to have clean peg holes, with no writing or other pencil markings within 1 inch of the peg hole.
(I decided to add the sound (grabbed from the DVD of The Fox & The Hound ... the lip sync is soft because of YouTube's flash player, which always tends to throw off the sound by several frames.)
As a follow-up here is another test I made today. These are scans from original animation drawings. The peg holes are in good shape. The center round peg hole and at least one of the oblong holes have peg reinforcements. Oddly enough there is about the same slight bit of weaving and jitter on these "pristine" peg holes as on the peg holes from the photocopied scene of the badger above. In the following test I've run it at full speed, then again in slower motion , and again at full speed. The blue reference marks are on a held layer so those are a reference point for seeing how much actual jitter there is on the peg holes. There is more jitter than I expected from using original drawings , but is within a tolerable amount of jitter because the animation looks smooth.
I wonder if there is some additional setting I should be doing in the Pixel Tracker to get a higher degree of accuracy ?
Here are the settings I used:
Reference : Dynamic
Channel: RGBA
Accuracy: 1 -1
--------
However, in the meantime , the 2-Point Stabilization is quite usable for this purpose. It just takes some getting used to and some manual set-up at the beginning. It helps to SAVE the stabilization coordinates to the FX Bin, so similarly scanned scenes can be auto-aligned without any additional manual set-up. If the scanner set-up and the size and placement of the drawings is similar every time a new set of drawings is scanned then the saved Stabilization points in the Bin should work fine.
I am in the process of creating a tutorial for my students on how to use the 2-Point Stabilization FX to lock down peg holes on drawings that have been scanned off-pegs.
(I usually encourage students to scan on-pegs , but some prefer to scan off-pegs because it's a bit faster when scanning on a flatbed and of course is MUCH faster when running drawings through an Auto-Document Feed scanner.) Since I remembered this discussion thread I thought I'd put up an example of a test I did to show how 2-Point Stabilization works for peg hole alignment.
Today as a test I took a photocopied scene I have had in my collection for many years. The original photocopies were made off-pegs and the peg holes on the copies are shifting around a lot. In addition the peg holes had photocopied somewhat lightly, so on some drawings the holes were not very clear.
I scanned the photocopies, then loaded them into TVP. I used Scan Cleaner to make the drawings and the peg holes darker. Then I used the Pixel Tracker and 2-Point Stabilization to track the two outer peg hole shapes (the two oblong shapes) and here are the results :
Notice that the peg holes are now quite steady. There is a bit of residual jitter around the peg holes which is from artifacts on the original photocopies and the fact that the photocopying process also introduced some slight distortion into the peg holes, but overall the results are very solid. (on the originals the peg holes jerked and jittered noticeably) Of the several tests I made I had better results using the two outer (oblong) peg holes rather than using one oblong and the round center peg hole.
I will be using an original scene for the tutorial, but I wanted to try registering a poorly scanned , "worst case" example of peg holes that were not in good shape to begin with. This took a bit of extra tweaking using Scan Cleaner and Curves (alpha) to darken the peg holes , but the process is faster and easier when using original drawings where the image quality can be controlled better to begin with. It helps to have clean peg holes, with no writing or other pencil markings within 1 inch of the peg hole.
(I decided to add the sound (grabbed from the DVD of The Fox & The Hound ... the lip sync is soft because of YouTube's flash player, which always tends to throw off the sound by several frames.)
As a follow-up here is another test I made today. These are scans from original animation drawings. The peg holes are in good shape. The center round peg hole and at least one of the oblong holes have peg reinforcements. Oddly enough there is about the same slight bit of weaving and jitter on these "pristine" peg holes as on the peg holes from the photocopied scene of the badger above. In the following test I've run it at full speed, then again in slower motion , and again at full speed. The blue reference marks are on a held layer so those are a reference point for seeing how much actual jitter there is on the peg holes. There is more jitter than I expected from using original drawings , but is within a tolerable amount of jitter because the animation looks smooth.
I wonder if there is some additional setting I should be doing in the Pixel Tracker to get a higher degree of accuracy ?
Here are the settings I used:
Reference : Dynamic
Channel: RGBA
Accuracy: 1 -1
--------
Yes I agree that the process for registering the peg holes on traditional animation drawings is still a bit too complicated in TVP , and since most traditional animation drawings use Three Peg Hole systems it would make sense to have a "3-Point Stabilization" process for handling peg hole registration. If the process could be a bit more automated like in Digicel Flipbook's "AutoScan" process or Animo's "Scan Level Auto Align" process it would increase the functionality of the program for people using TVP to combine traditional pencil-on-paper drawings with paperless animation . (or simply to use TVP for traditional pencil tests.) I understand that the 2-Point Stabilization is intended for effects work other than peg-hole registration, so I would not want to lose the functionality of 2-Point Stabilization, but if there were some way to add a new FX node which automated the process of aligning peg holes that would be a nice additional function to have.Animark wrote: But after all its much more complicated than just checking a box to find the pegholes and registrate to eachother.
However, in the meantime , the 2-Point Stabilization is quite usable for this purpose. It just takes some getting used to and some manual set-up at the beginning. It helps to SAVE the stabilization coordinates to the FX Bin, so similarly scanned scenes can be auto-aligned without any additional manual set-up. If the scanner set-up and the size and placement of the drawings is similar every time a new set of drawings is scanned then the saved Stabilization points in the Bin should work fine.
Re: Peg Hole Recognition
It may arrive soon.but if there were some way to add a new FX node which automated the process of aligning peg holes that would be a nice additional function to have.
Fabrice Debarge