View Full Version : Mask creation
yup
11th March 2007, 17:48
Hi folk.
During analog capture on video forming black line or dot (with luma value 16) and white line and dot (with luma value 235). Please advise how I can get information from clip for getting mask for point with luma value 16 and 235 (I read documentation about mt_masktools and find only 2 function for generation mask mt_edge and mt_motion). After I want use medianblur for clip and replace point from mask to blured, other point not changed.
With kind regards yup.
Manao
11th March 2007, 19:04
See the documentation on mt_binarize.
yup
12th March 2007, 05:30
Manao! Thanks for reply. Need I convert my clip to gray or I can simple write:
mask=mt_binarize(clip,16,false) for black lines and dots
Also Manao speak me how I can expand mask only one direction from left to right (for trace black and white line) mt_expand with mode horizantal expand in both direction, please advise matrix. For horizantal in documentation write "0 0 -1 0 1 0" how it work?
With kind regards yup.
Manao
12th March 2007, 06:27
You don't need to convert your clip to gray.
mt_expand takes a list of coordinates. "0 0 -1 0 1 0" means that the pixel at (x,y) will be expand at (x+0,y+0), (x-1,y+0) and (x+1,y+0). You want to expand from left to right, so you have to use "0 0 1 0".
yup
13th March 2007, 13:19
Hi Manao!
Thank you for advise. In documentation for 1.5.8 write:
Binarize (clip, int "threshold", bool "upper")
The Binarize filter allows a basic thresholding of a picture. If upper=true, a pixel whose value is strictly superior to threshold will be set to zero, else to 255. On the contrary, if upper=false, a pixel whose value is strictly superior to threshold will be set to 255, else to zero.
Defaults are threshold = 20 and upper = true.
In documentation for 2.0a30 write:
mt_binarize
mt_binarize : clip c, int threshold(128), bool upper(false)
If upper is false, forces all values strictly over threshold to 0, and all others to 255.
Else, forces all values strictly over threshold to 255, else to 0.
upper = true is equivalent to mt_lut("x threshold > 0 255 ?"), but faster.
upper = false is equivalent to mt_lut("x threshold > 255 0 ?"), but faster.
You change way to binarize in new version? If i want use custom matrices (for finding horizontal lines) for findind edge i need use new version?
With kind regards yup.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.