![]() |
|
|
|||||||
| IC Imaging Control C++ Class Library Please use this forum for IC Imaging Control C++ Class Library support only. If you need support for the ActiveX or .NET version, please use the appropriate forum. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Filter Problem
Hi,
I am trying to set up a small filter chain of two filters. The first one is a color classification filter, which takes an RGB24 image and converts it into a RGB8 image (of course does some color lookup and so on too). The second one is the binarization filter from the samples. I have set up the input and output type methods as follows: Code:
void CColorClassifierFilter::getSupportedInputTypes( DShowLib::FrameTypeInfoArray& arr ) const
{
// This filter works for 24-bit-color images only
arr.addFrameType( eRGB24 );
}
bool CColorClassifierFilter::getTransformOutputTypes( const DShowLib::FrameTypeInfo& in_type, DShowLib::FrameTypeInfoArray& out_types ) const
{
FrameTypeInfo out_type = eRGB8;
out_type.dim = in_type.dim;
out_type.buffersize = out_type.dim.cx * out_type.dim.cy;
out_types.push_back( out_type );
return true;
}
Code:
void CBinarizationFilter::getSupportedInputTypes( DShowLib::FrameTypeInfoArray& arr ) const
{
// This filter works for 8-bit-gray images only
arr.push_back( eRGB8 );
}
bool CBinarizationFilter::getTransformOutputTypes( const DShowLib::FrameTypeInfo& in_type, DShowLib::FrameTypeInfoArray& out_types ) const
{
// We don't change the image type, output = input
out_types.push_back( in_type );
return true;
}
Code:
// Set filter parameters. tFrameFilterList filterList; // Use .get to extract a plain pointer from the smart pointer. filterList.push_back( &m_binarizationFilter ); filterList.push_back( &m_ColorClassifierFilter ); m_Grabber.setDeviceFrameFilters( filterList ); Code:
TffdshowBase::Constructor TffdshowDecVideo::Constructor Join filter graph CheckInputType: , 1024, 768 CheckInputType: , 1024, 768 CheckInputType: , 1024, 768 CheckInputType: , 1024, 768 CheckInputType: , 1024, 768 Removed from filter graph Destructor Code:
TffdshowBase::Constructor TffdshowDecVideo::Constructor Join filter graph CheckInputType: , 1024, 768 CheckInputType: Y800, 1024, 768 Removed from filter graph Destructor Any idea what I am doing wrong??? If I change the order of the Filters I get an (expected) exception.... Thanks in advance for any suggestions... Fabian |
|
#2
|
|||
|
|||
|
Hi...
I actually got this problem fixed... Seems like I was a bit overworked yesterday... Of course the order of the filters DO work the other way round... The exception I got then, had to do with some idiotic fumbling of mine with pointer indices... ;) so never mind to delete the whole post since it wouldnt help anyone I guess... |
|
#3
|
||||
|
||||
|
Fabian,
Thank you for the thread, i think it is interesting and wont delete it!
__________________
Best regards Stefan IC Imaging Control Support |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MV Recording filter options | brow0833 | MontiVision Development Kit | 3 | May 31, 2006 20:32:16 |
| Version 2.2 released! | Marc Cymontkowski | MontiVision Development Kit | 0 | August 6, 2004 11:50:16 |
| loading directx graphs that contain a Sony 1394 Capture filter using IGraphBuilder::RenderFile() | Unregistered | IC Imaging Control ActiveX | 2 | November 14, 2002 10:21:07 |