[Rock-dev] frame.h: new frame mode_pjpg

Alexander Duda Alexander.Duda at dfki.de
Fri Sep 2 13:57:50 CEST 2011


On Fri, 2011-09-02 at 13:13 +0200, Matthias Goldhoorn wrote:
> On 31.08.2011 11:32, Alexander Duda wrote:
> > On Wed, 2011-08-31 at 10:53 +0200, Matthias Goldhoorn wrote:
> >> On 31.08.2011 10:51, Alexander Duda wrote:
> >>> On Wed, 2011-08-31 at 10:04 +0200, Matthias Goldhoorn wrote:
> >>>> On 31.08.2011 09:01, Alexander Duda wrote:
> >>>>> I stumbled over the recently added frame_mode MODE_PJPG. I thought we
> >>>>> all agreed that we are not extending the class Frame to handle
> >>>>> compressed images.
> >>>>>
> >>>>> Alex
> >>>>>
> >>>> I Only added some types to the enum, this make it easier instead having
> >>>> two type enums...
> >>> I would create a new enum for compressed images because this one has
> >>> little in common with the one from frame. Putting everything in one is
> >>> just confusing.
> >>>
> >>> Alex
> >>>
> >> With one big enum you could even convert the base::frame in jpeg or
> >> something else if needed, you could use the same function...
> > I do not understand how you want to use the same functions if you have
> > an object a of class A and an object b of a non related class B.
> >
> > You have to convert a into b and after this you can use the same
> > functions. Adding a new mode to B which cannot be handled by B does not
> > help. Or do I miss something?
> >
> > Alex
> >
> >
> Ok i recheckt it, i use in the FrameHelper only the buffer * of the 
> image and the type as argument, for the frame helper on this point it 
> makes no difference between compressed or uncompressed types. That's the 
> reason why i added also the compressed types to the frame to keep one 
> general definition.

That is exactly that I mean you are mixing compressed and non compressed
images. 

You should add a new conversion routine 
FrameHelper::compressFrame(const Frame&,CompressedFrame&)
FrameHelper::uncompressFrame(const CompressedFrame&,Frame&)
or an operater=

and not mix it with color conversion routines which are meant to convert
the content of a Frame.

Alex

-- 
Dipl.-Ing. Alexander Duda 
Unterwasserrobotik

DFKI Bremen
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0)421 178-456620
Fax:   +49 (0)421 178-454150
E-Mail: alexander.duda at dfki.de

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3



More information about the Rock-dev mailing list