|
|
| 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 |
 |
| 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(); } }
|
|
 |
|