johnmeyer
7th April 2006, 02:10
I have one small, but interesting problem left in the video transfer project I described here:
http://forum.doom9.org/showthread.php?t=106837
You can download a sample clip from that project here:
http://download.yousendit.com/4769F7937CBF6A84
The problem is that once I have recovered the original progressive frames from the video transfer, some of them have a horizontal shift between the two fields that make up each frame. These fields were created at different instants in time, and were both taken of the same frame of film while it was stationary in the projector's film gate. Therefore, they should be offset vertically by the amount of the field offset, but there should be no horizontal shift.
I think the horizontal shift is due to some residual misalignment in my projector, and the film is still sliding sideways after it should have come to rest. It doesn't happen on every frame, but when it does happen, it results in a slight combing.
I have used Separatefields() on the raw capture and have verified that the problem definitely exists in the raw capture and is not the result of some later manipulations by my script.
So, what I need to do is to separate each frame into two fields, and then use something like Depan to get those two frames to align horizontally. However, I only want to operate on two fields at a time; I don't want to look at the second field from the current frame and compare it to the first field from the next frame.
So that is my problem: How can I operate on the two fields within a frame, and line them up, and then once I've done that, do the same thing for the two fields on the next frame?
I started with this code:
separatefields()
mdata2 = DePanEstimate(range=1, dxmax=20,dymax=0)
DePanStabilize(data=mdata2,prev=0,next=0,dxmax=20,dymax=0,info=true)
but then realized that it was trying to stabilize from field-to-field-to-field, instead of just between the two fields of each frame. As I think through this, I believe the solution probably involves doubling the number of frames, immediately after the separatefields() line, and then after doing the stabilization, doing a SelectEvery().
But that's as far as I've gotten. Any hints, help, or ideas would be greatly appreciated.
P.S. For extra credit: It is also possible that the film is not stationary in the vertical direction either. The result of that would be a slight overlap of the two fields, resulting in something that looks a little soft. It would be nice to solve this problem as well, to the extent it exists. I think this involves doing a Bob() and then doing the vertical stabilization, but that's as far as I've gotten on that one.
http://forum.doom9.org/showthread.php?t=106837
You can download a sample clip from that project here:
http://download.yousendit.com/4769F7937CBF6A84
The problem is that once I have recovered the original progressive frames from the video transfer, some of them have a horizontal shift between the two fields that make up each frame. These fields were created at different instants in time, and were both taken of the same frame of film while it was stationary in the projector's film gate. Therefore, they should be offset vertically by the amount of the field offset, but there should be no horizontal shift.
I think the horizontal shift is due to some residual misalignment in my projector, and the film is still sliding sideways after it should have come to rest. It doesn't happen on every frame, but when it does happen, it results in a slight combing.
I have used Separatefields() on the raw capture and have verified that the problem definitely exists in the raw capture and is not the result of some later manipulations by my script.
So, what I need to do is to separate each frame into two fields, and then use something like Depan to get those two frames to align horizontally. However, I only want to operate on two fields at a time; I don't want to look at the second field from the current frame and compare it to the first field from the next frame.
So that is my problem: How can I operate on the two fields within a frame, and line them up, and then once I've done that, do the same thing for the two fields on the next frame?
I started with this code:
separatefields()
mdata2 = DePanEstimate(range=1, dxmax=20,dymax=0)
DePanStabilize(data=mdata2,prev=0,next=0,dxmax=20,dymax=0,info=true)
but then realized that it was trying to stabilize from field-to-field-to-field, instead of just between the two fields of each frame. As I think through this, I believe the solution probably involves doubling the number of frames, immediately after the separatefields() line, and then after doing the stabilization, doing a SelectEvery().
But that's as far as I've gotten. Any hints, help, or ideas would be greatly appreciated.
P.S. For extra credit: It is also possible that the film is not stationary in the vertical direction either. The result of that would be a slight overlap of the two fields, resulting in something that looks a little soft. It would be nice to solve this problem as well, to the extent it exists. I think this involves doing a Bob() and then doing the vertical stabilization, but that's as far as I've gotten on that one.