Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Multi Spectral Videos, Can VD be modified for this
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
rfrank5356
Posted: Feb 14 2011, 05:43 PM


Newbie


Group: Members
Posts: 4
Member No.: 20975
Joined: 1-March 07



Hi - I have a multi spectral raster imager, and want to look for individual pixels in the frames based on selected value ranges of particular spectral segment. Sort of like (R=220h, G=52h, B=0h), except that there will be a lot of spectral bands. So can the VD code be extended to look at n bands? Does this imply that a codec is needed as an interface? Beyond the additional bands, there is a file size issue, as the files will be quite large.

Thanks

Bob
 
     Top
phaeron
Posted: Feb 19 2011, 10:12 PM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



I'm not sure exactly what kind of transformation you need, but if it's extracting certain ranges of pixel colors, you can do that with vdshader:

http://www.virtualdub.org/downloads/vdshader-1.2.zip
http://www.virtualdub.org/downloads/vdshad...der-1.2-src.zip

Here's a shader that draws white pixels within a radius of 10 from (220, 52, 0):

CODE

texture vd_srctexture;

sampler src = sampler_state {
texture = (vd_srctexture);
};

float4 PS(float2 uv: TEXCOORD0) : COLOR0 {
float3 px = tex2D(src, uv).rgb;

return length(px - float3(220, 52, 0)/255.0) < 10.0/255.0;
}

technique {
pass {
 PixelShader = compile ps_3_0 PS();
}
}

 
    Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
1 replies since Feb 14 2011, 05:43 PM Track this topic | Email this topic | Print this topic

<< Back to VirtualDub Development Forum