Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Interlace Image in Machine Vision

Solved!
Go to solution

Hi, 

I would like to combine interlaced image fields so that the resulting image has all fields (even and odd) populated. I could use CWIMAQVision.InterlaceSeparate to separate even and odd fields and the use CWIMAQVision.InterlaceCombine to fill the missing fields. I am afraid this will not give me the desired result, because the missing field are only replaced by the values in odd or even field. I would like to replace the missing field values with the interpolated values obtained from the fields above and below the missing field. Is there is way to accomplish this?

 

Regards.

Ekramul Majid 

0 Kudos
Message 1 of 6
(4,354 Views)

I would probably do the deinterlace, then use resample to double the Y resolution.  The resample function uses interpolation to fill in the missing pixels.  I'm not sure exactly what the resample function is called in CW.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 6
(4,352 Views)

FYI, the resample function Bruce mentioned is CWIMAQVision.Resample2.

 

Greg Stoll

Vision R&D

National Instruments

Greg Stoll
LabVIEW R&D
0 Kudos
Message 3 of 6
(4,330 Views)

Hi Greg,

Thanks for the reply. I tried but CWIMAQVision.Resample2 appears to be used for filling the missing fields when stretching the image. When used to produce an image of the original size, there was no effect.

Any other suggestions?

 

Ekramul Majid 

0 Kudos
Message 4 of 6
(4,325 Views)
Solution
Accepted by ekramul1

Either I misunderstand what you are trying to do, or you missed a step.  Here is my suggestion in more detail:

 

Start with an interlaced image 640x480.

 

Deinterlace to get an odd field (640x240) and an even field (640x240).

 

Pick a field and use resample to interpolate back to 640x480.  This will double the Y dimension of the image.

 

Isn't that what you are asking for?  If not, explain further what you are trying to do.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 5 of 6
(4,314 Views)

Hi Bruce,

Thanks, it worked.

 

Ekramul

0 Kudos
Message 6 of 6
(4,311 Views)