Skip to content

Commit

Permalink
Renamed dbvidl2 to vidl
Browse files Browse the repository at this point in the history
  • Loading branch information
mleotta committed Aug 30, 2010
1 parent c6b1489 commit 2ca6f94
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 81 deletions.
10 changes: 5 additions & 5 deletions dbpro/filters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ set(dbpro_filters_sources

dbbgm.h

dbvidl2_source.cxx dbvidl2_source.h
dbvidl2_multi_source.cxx dbvidl2_multi_source.h
dbvidl2_sink.cxx dbvidl2_sink.h
dbvidl2_frame_to_resource.cxx dbvidl2_frame_to_resource.h
dbvidl2_resource_to_frame.cxx dbvidl2_resource_to_frame.h
vidl_source.cxx vidl_source.h
vidl_multi_source.cxx vidl_multi_source.h
vidl_sink.cxx vidl_sink.h
vidl_frame_to_resource.cxx vidl_frame_to_resource.h
vidl_resource_to_frame.cxx vidl_resource_to_frame.h
)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is dbpro/filters/dbvidl2_frame_to_resource.cxx
// This is dbpro/filters/vidl_frame_to_resource.cxx

// Copyright Matthew Leotta 2006 - 2010.
// Distributed under the Boost Software License, Version 1.0.
Expand All @@ -8,14 +8,14 @@
//:
// \file

#include "dbvidl2_frame_to_resource.h"
#include "vidl_frame_to_resource.h"
#include <vidl/vidl_convert.h>
#include <vil/vil_new.h>


//: Run the process on the current frame
dbpro_signal
dbvidl2_frame_to_resource::execute()
vidl_frame_to_resource::execute()
{
assert(input_type_id(0) == typeid(vidl_frame_sptr));
vidl_frame_sptr frame = input<vidl_frame_sptr>(0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This is dbpro/filters/dbvidl2_frame_to_resource.h
#ifndef dbvidl2_frame_to_resource_h_
#define dbvidl2_frame_to_resource_h_
// This is dbpro/filters/vidl_frame_to_resource.h
#ifndef vidl_frame_to_resource_h_
#define vidl_frame_to_resource_h_

//:
// \file
Expand All @@ -25,7 +25,7 @@


//: Convert a vidl_frame into a vil_image_resource
class dbvidl2_frame_to_resource : public dbpro_filter
class vidl_frame_to_resource : public dbpro_filter
{
public:

Expand All @@ -45,25 +45,26 @@ class dbvidl2_frame_to_resource : public dbpro_filter
enum buffer_t { ALLOCATE_MEMORY, REUSE_MEMORY };

//: Default Constructor
dbvidl2_frame_to_resource() : image_rsc_(NULL),
output_format_(VIL_PIXEL_FORMAT_BYTE),
color_(VIDL_PIXEL_COLOR_UNKNOWN),
channel_mode_(INTERLEAVED),
buffer_mode_(ALLOCATE_MEMORY),
wrap_mode_(REQUIRE_WRAP) {}
vidl_frame_to_resource()
: image_rsc_(NULL),
output_format_(VIL_PIXEL_FORMAT_BYTE),
color_(VIDL_PIXEL_COLOR_UNKNOWN),
channel_mode_(INTERLEAVED),
buffer_mode_(ALLOCATE_MEMORY),
wrap_mode_(REQUIRE_WRAP) {}

//: Constructor
dbvidl2_frame_to_resource( wrap_t wrap,
vil_pixel_format of=VIL_PIXEL_FORMAT_BYTE,
vidl_pixel_color color=VIDL_PIXEL_COLOR_UNKNOWN,
channel_t channel=PLANES,
buffer_t buffer=ALLOCATE_MEMORY)
vidl_frame_to_resource( wrap_t wrap,
vil_pixel_format of=VIL_PIXEL_FORMAT_BYTE,
vidl_pixel_color color=VIDL_PIXEL_COLOR_UNKNOWN,
channel_t channel=PLANES,
buffer_t buffer=ALLOCATE_MEMORY)
: image_rsc_(NULL), output_format_(of), color_(color),
channel_mode_(channel), buffer_mode_(buffer),
wrap_mode_(wrap) {}

//: Destructor
virtual ~dbvidl2_frame_to_resource(){}
virtual ~vidl_frame_to_resource(){}

//: Execute this process
dbpro_signal execute();
Expand All @@ -79,4 +80,4 @@ class dbvidl2_frame_to_resource : public dbpro_filter

};

#endif // dbvidl2_frame_to_resource_h_
#endif // vidl_frame_to_resource_h_
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is dbpro/filters/dbvidl2_multi_source.cxx
// This is dbpro/filters/vidl_multi_source.cxx

// Copyright Matthew Leotta 2006 - 2010.
// Distributed under the Boost Software License, Version 1.0.
Expand All @@ -8,13 +8,13 @@
//:
// \file

#include "dbvidl2_multi_source.h"
#include "vidl_multi_source.h"
#include <vidl/vidl_istream.h>


//: Run the process on the current frame
dbpro_signal
dbvidl2_multi_source::execute()
vidl_multi_source::execute()
{
bool all_passed = true;
for(unsigned int i=0; i<istreams_.size(); ++i){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This is dbpro/filters/dbvidl2_multi_source.h
#ifndef dbvidl2_multi_source_h_
#define dbvidl2_multi_source_h_
// This is dbpro/filters/vidl_multi_source.h
#ifndef vidl_multi_source_h_
#define vidl_multi_source_h_

//:
// \file
Expand All @@ -24,19 +24,19 @@
#include <vidl/vidl_istream_sptr.h>

//: A source that provides frames from multiple video streams in sync
class dbvidl2_multi_source : public dbpro_source
class vidl_multi_source : public dbpro_source
{
public:

//: Constructor
dbvidl2_multi_source() {}
vidl_multi_source() {}

//: Constructor
dbvidl2_multi_source(const vcl_vector<vidl_istream_sptr>& streams)
vidl_multi_source(const vcl_vector<vidl_istream_sptr>& streams)
: istreams_(streams) {}

//: Destructor
virtual ~dbvidl2_multi_source(){}
virtual ~vidl_multi_source(){}

//: add an istream
void add_stream(const vidl_istream_sptr& is) { istreams_.push_back(is); }
Expand All @@ -53,4 +53,4 @@ class dbvidl2_multi_source : public dbpro_source
vcl_vector<vidl_istream_sptr> istreams_;
};

#endif // dbvidl2_multi_source_h_
#endif // vidl_multi_source_h_
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is dbpro/filters/dbvidl2_resource_to_frame.cxx
// This is dbpro/filters/vidl_resource_to_frame.cxx

// Copyright Matthew Leotta 2006 - 2010.
// Distributed under the Boost Software License, Version 1.0.
Expand All @@ -8,14 +8,14 @@
//:
// \file

#include "dbvidl2_resource_to_frame.h"
#include "vidl_resource_to_frame.h"
#include <vidl/vidl_convert.h>
#include <vil/vil_image_resource.h>


//: Run the process on the current frame
dbpro_signal
dbvidl2_resource_to_frame::execute()
vidl_resource_to_frame::execute()
{
assert(input_type_id(0) == typeid(vil_image_resource_sptr));
vil_image_resource_sptr image = input<vil_image_resource_sptr>(0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This is dbpro/filters/dbvidl2_resource_to_frame.h
#ifndef dbvidl2_resource_to_frame_h_
#define dbvidl2_resource_to_frame_h_
// This is dbpro/filters/vidl_resource_to_frame.h
#ifndef vidl_resource_to_frame_h_
#define vidl_resource_to_frame_h_

//:
// \file
Expand All @@ -23,15 +23,15 @@


//: Convert a vil_image_resource into a vidl_frame
class dbvidl2_resource_to_frame : public dbpro_filter
class vidl_resource_to_frame : public dbpro_filter
{
public:

//: Constructor
dbvidl2_resource_to_frame(){}
vidl_resource_to_frame(){}

//: Destructor
virtual ~dbvidl2_resource_to_frame(){}
virtual ~vidl_resource_to_frame(){}

//: Execute this process
dbpro_signal execute();
Expand All @@ -40,4 +40,4 @@ class dbvidl2_resource_to_frame : public dbpro_filter

};

#endif // dbvidl2_resource_to_frame_h_
#endif // vidl_resource_to_frame_h_
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is dbpro/filters/dbvidl2_sink.cxx
// This is dbpro/filters/vidl_sink.cxx

// Copyright Matthew Leotta 2006 - 2010.
// Distributed under the Boost Software License, Version 1.0.
Expand All @@ -8,14 +8,14 @@
//:
// \file

#include "dbvidl2_sink.h"
#include "vidl_sink.h"
#include <vidl/vidl_ostream.h>



//: Run the process on the current frame
dbpro_signal
dbvidl2_sink::execute()
vidl_sink::execute()
{
if(!ostream_)
return DBPRO_VALID;
Expand Down
14 changes: 7 additions & 7 deletions dbpro/filters/dbvidl2_sink.h → dbpro/filters/vidl_sink.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This is dbpro/filters/dbvidl2_sink.h
#ifndef dbvidl2_sink_h_
#define dbvidl2_sink_h_
// This is dbpro/filters/vidl_sink.h
#ifndef vidl_sink_h_
#define vidl_sink_h_

//:
// \file
Expand All @@ -23,15 +23,15 @@
#include <vidl/vidl_ostream_sptr.h>

//: Convert a vidl_ostream into a dbpro_sink
class dbvidl2_sink : public dbpro_sink
class vidl_sink : public dbpro_sink
{
public:

//: Constructor
dbvidl2_sink(const vidl_ostream_sptr& o) : ostream_(o) {}
vidl_sink(const vidl_ostream_sptr& o) : ostream_(o) {}

//: Destructor
virtual ~dbvidl2_sink(){}
virtual ~vidl_sink(){}

//: Set the ostream
void set_stream(const vidl_ostream_sptr& o) { ostream_ = o; }
Expand All @@ -46,4 +46,4 @@ class dbvidl2_sink : public dbpro_sink
vidl_ostream_sptr ostream_;
};

#endif // dbvidl2_sink_h_
#endif // vidl_sink_h_
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is dbpro/filters/dbvidl2_source.cxx
// This is dbpro/filters/vidl_source.cxx

// Copyright Matthew Leotta 2006 - 2010.
// Distributed under the Boost Software License, Version 1.0.
Expand All @@ -8,13 +8,13 @@
//:
// \file

#include "dbvidl2_source.h"
#include "vidl_source.h"
#include <vidl/vidl_istream.h>


//: Run the process on the current frame
dbpro_signal
dbvidl2_source::execute()
vidl_source::execute()
{
if(!istream_->advance()){
return DBPRO_EOS;
Expand Down
14 changes: 7 additions & 7 deletions dbpro/filters/dbvidl2_source.h → dbpro/filters/vidl_source.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This is dbpro/filters/dbvidl2_source.h
#ifndef dbvidl2_source_h_
#define dbvidl2_source_h_
// This is dbpro/filters/vidl_source.h
#ifndef vidl_source_h_
#define vidl_source_h_

//:
// \file
Expand All @@ -23,15 +23,15 @@
#include <vidl/vidl_istream_sptr.h>

//: Convert a vidl_istream into a dbpro_source
class dbvidl2_source : public dbpro_source
class vidl_source : public dbpro_source
{
public:

//: Constructor
dbvidl2_source(const vidl_istream_sptr& i) : istream_(i) {}
vidl_source(const vidl_istream_sptr& i) : istream_(i) {}

//: Destructor
virtual ~dbvidl2_source(){}
virtual ~vidl_source(){}

//: Set the istream
void set_stream(const vidl_istream_sptr& i) { istream_ = i; }
Expand All @@ -46,4 +46,4 @@ class dbvidl2_source : public dbpro_source
vidl_istream_sptr istream_;
};

#endif // dbvidl2_source_h_
#endif // vidl_source_h_
2 changes: 1 addition & 1 deletion modrec/modrec_vehicle_fit_video.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <vgl/vgl_area.h>
#include <dbpro/dbpro_observer.h>
#include <vil/vil_image_resource.h>
#include <dbpro/filters/dbvidl2_source.h>
#include <dbpro/filters/vidl_source.h>
#include <vnl/algo/vnl_cholesky.h>

#include <vnl/algo/vnl_symmetric_eigensystem.h>
Expand Down
28 changes: 14 additions & 14 deletions modrec/modrec_vehicle_tracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

#include <dbpro/dbpro_delay.h>
#include <dbpro/dbpro_basic_processes.h>
#include <dbpro/filters/dbvidl2_source.h>
#include <dbpro/filters/dbvidl2_frame_to_resource.h>
#include <dbpro/filters/vidl_source.h>
#include <dbpro/filters/vidl_frame_to_resource.h>
#include <dbpro/filters/dbil_gauss_filter.h>
#include <dbpro/filters/dbil_sobel_1x3_filter.h>
#include <dbpro/filters/dbil_subpix_edge_filter.h>
Expand Down Expand Up @@ -834,17 +834,17 @@ modrec_vehicle_tracker::modrec_vehicle_tracker(modrec_vehicle_fit_video* optimiz
se.set_to_disk(2.0);

//graph_.enable_debug();
graph_["source"] = new dbvidl2_source(NULL);
graph_["to_resource"] = new dbvidl2_frame_to_resource(dbvidl2_frame_to_resource::ALLOW_WRAP,
VIL_PIXEL_FORMAT_BYTE,VIDL_PIXEL_COLOR_RGB,
dbvidl2_frame_to_resource::PLANES,
dbvidl2_frame_to_resource::REUSE_MEMORY);
graph_["to_rsc_mono"] = new dbvidl2_frame_to_resource(dbvidl2_frame_to_resource::ALLOW_WRAP,
VIL_PIXEL_FORMAT_BYTE,VIDL_PIXEL_COLOR_MONO,
dbvidl2_frame_to_resource::PLANES,
dbvidl2_frame_to_resource::ALLOCATE_MEMORY);
//dbvidl2_frame_to_resource::REUSE_MEMORY);
graph_["source"] = new vidl_source(NULL);
graph_["to_resource"] = new vidl_frame_to_resource(vidl_frame_to_resource::ALLOW_WRAP,
VIL_PIXEL_FORMAT_BYTE,VIDL_PIXEL_COLOR_RGB,
vidl_frame_to_resource::PLANES,
vidl_frame_to_resource::REUSE_MEMORY);

graph_["to_rsc_mono"] = new vidl_frame_to_resource(vidl_frame_to_resource::ALLOW_WRAP,
VIL_PIXEL_FORMAT_BYTE,VIDL_PIXEL_COLOR_MONO,
vidl_frame_to_resource::PLANES,
vidl_frame_to_resource::ALLOCATE_MEMORY);
//vidl_frame_to_resource::REUSE_MEMORY);
graph_["gauss_img"] = new dbil_gauss_filter<vxl_byte,float>();
graph_["grad_ij"] = new dbil_sobel_1x3_filter<float,float>();
graph_["edge_map"] = new dbil_subpix_edge_filter<float,float>();
Expand Down Expand Up @@ -1059,7 +1059,7 @@ void modrec_vehicle_tracker::set_vehicle_model(const modrec_pca_vehicle& vehicle
//: set the video input stream
void modrec_vehicle_tracker::set_istream(const vidl_istream_sptr& istream)
{
dbvidl2_source* source = dynamic_cast<dbvidl2_source*>(graph_["source"].ptr());
vidl_source* source = dynamic_cast<vidl_source*>(graph_["source"].ptr());
if(source){
source->set_stream(istream);
}
Expand Down

0 comments on commit 2ca6f94

Please sign in to comment.