|
|
Comments and Discussions
|
|
 |

|
First off, like to say thanks for providing the GIL-openCV bindings. I've been working on something similar recently.
I'm not terribly familiar with GIL yet so I have a couple q's about the implementation.
In the top_left_view_from_ipl_image functions, you use "type_from_x_iterator" which provides the view, the xy-locator and the step-iterator types. I think channel_t is suppose to be the pixel type but to get this from iterators I've used
std::iterator_traits::value_type
Same thing or am I misinterpreting something?
--EDIT: actually, planar_rgb_view requires channel_type inputs so that doesn't work. I have to use:
typedef typename boost::gil::type_from_x_iterator::view_t view_t;
typedef typename boost::gil::channel_type::type channel_t;
however.
Also, out of the three you libs you list, which do you prefer?
Cheers,
Chris
|
|
|
|

|
Sorry too late reply
gil proSorry too late reply
gil provides some sample code for usage
I just obey the style of the sample code
In that sample code
type_from_x_iterator::view_t
is used. Thus this is my prefer
|
|
|
|
|

|
Plz use
CiplvBasicImage(IPLIMAGE IplImageIn);
instead of
CiplvBasicImage(IPLIMAGE* pIplImageIn);
Upper function works correctly.
And lower will fixed in next version.
-- modified at 23:26 Saturday 25th November, 2006
|
|
|
|

|
first, thanks a lot for this *very* interesting project!
I downloaded the current version (0.7.6) from sourceforge and compiled it with VC7.1 (stllcv_vs2003). I finally succeeded to compile it with Adobe-GIL,boost,jpglib etc. but i don't have ipl. The Intel IPL is outdated now, replaced by ippi, and i still get an error:
>LINK : fatal error LNK1104: cannot open file 'ipl.lib'
In the sample code, at least one IPL call is done in basicimage..cpp:
iplRotate(iplvImage1.pIplImage, iplvImage2.pIplImage,30.0, 100 ,150 ,IPL_INTER_NN);
Any suggestions? Work-Arounds? (i already commented out the ipl lines, but examples will work strange then)
|
|
|
|
|

|
Subversion enabled
http://stllcv.svn.sourceforge.net/viewvc/stllcv/stllcv/trunk/
|
|
|
|

|
I wrapped OpenCV using adobe::gil
plz see class
iplimage_wrapper
------------------------
#ifdef WIN32
#define _CRT_SECURE_NO_DEPRECATE 1
#pragma warning(disable : 4244) //
#pragma warning(disable : 4996) // MSFT declared it deprecated
#endif
#include
#include "cv.h"
#include "highgui.h"
#include "interleaved_ptr.hpp"
templateclass CiplImageDepth {public: int depth;CiplImageDepth(){depth= sizeof(PIXELTYPE);}};
template<>class CiplImageDepth {public: int depth;CiplImageDepth(){depth= IPL_DEPTH_8U;}};
template<>class CiplImageDepth {public: int depth;CiplImageDepth(){depth= IPL_DEPTH_8S;}};
template<>class CiplImageDepth {public: int depth;CiplImageDepth(){depth= IPL_DEPTH_16U;}};
template<>class CiplImageDepth {public: int depth;CiplImageDepth(){depth= IPL_DEPTH_16S;}};
template<>class CiplImageDepth {public: int depth;CiplImageDepth(){depth= IPL_DEPTH_32S;}};
template<>class CiplImageDepth {public: int depth;CiplImageDepth(){depth= IPL_DEPTH_32F;}};
template<>class CiplImageDepth {public: int depth;CiplImageDepth(){depth= IPL_DEPTH_64F;}};
using namespace gil;
templateclass ipl_colormodel_nchannels{public: const int nchannels; ipl_colormodel_nchannels():nchannels(0){} };
template<>class ipl_colormodel_nchannels< gray_t> {public: const int nchannels; ipl_colormodel_nchannels():nchannels(1){} };
template<>class ipl_colormodel_nchannels< bgr_t> {public: const int nchannels; ipl_colormodel_nchannels():nchannels(3){} };
template<>class ipl_colormodel_nchannels< bgra_t> {public: const int nchannels; ipl_colormodel_nchannels():nchannels(4){} };
template < typename Iterator, typename IPLIMAGE = IplImage>
class iplimage_wrapper : public type_from_x_iterator::view_t
{
public:
IPLIMAGE *pIplImage;
int iplDepthDef;
IPLIMAGE* initProc(int width,int height
)
{
ipl_colormodel_nchannels _colormodel_nchannels_;
CiplImageDepth iplImageDepth;
iplDepthDef=iplImageDepth.depth;
pIplImage=
cvCreateImage( cvSize(
width
, height),
iplDepthDef
, _colormodel_nchannels_.nchannels
);
return pIplImage;
}
iplimage_wrapper(int width, int height)
:
type_from_x_iterator::view_t(
interleaved_view(
pIplImage->widthStep /(sizeof(channel_t)*pIplImage->nChannels)
, height
,Iterator( reinterpret_cast( (pIplImage=initProc(width,height) )->imageData ))
,pIplImage->widthStep
)
)
{}
~iplimage_wrapper()
{
cvReleaseImage( &pIplImage );
}
};
template
struct halfdiff_cast_channels {
template Out operator()(const T& in1, const T& in2) const {
return Out((in2-in1)/2);
}
};
template
void x_gradient(const SrcView& src, const DstView& dst) {
typedef typename DstView::channel_t dst_channel_t;
for (int y=0; y<src.height(); ++y) {
typename SrcView::x_iterator src_it = src.row_begin(y);
typename DstView::x_iterator dst_it = dst.row_begin(y);
for (int x=1; x());
}
}
}
int main(int argc, unsigned char* argv[])
{
char winName[]="srcImg";
cvNamedWindow( winName, 1 );
IplImage *piplimg;
#if 1
piplimg=cvLoadImage( "test.jpg", 0 );
cvShowImage( winName, piplimg );
std::cout << "Wait Key Input" << std::endl;
cvWaitKey(0);
typedef interleaved_ptr gray8_interleaved_ptr;
typedef type_from_x_iterator::view_t gray8_interleaved_view_t;
gray8_interleaved_view_t gray_view=interleaved_view(piplimg->widthStep ,piplimg->height,
gray8_interleaved_ptr(
reinterpret_cast(piplimg->imageData)
),
sizeof(unsigned char)*piplimg->widthStep
);
iplimage_wrapper iplwrapgray1(piplimg->widthStep ,piplimg->height);
std::copy(gray_view.begin(),gray_view.end(),iplwrapgray1.begin());
cvShowImage( winName, iplwrapgray1.pIplImage );
std::cout << "Wait Key Input" << std::endl;
cvWaitKey(0);
x_gradient(gray_view,((gray8_interleaved_view_t)iplwrapgray1));
cvShowImage( winName, iplwrapgray1.pIplImage );
std::cout << "Wait Key Input" << std::endl;
cvWaitKey(0);
gray8_interleaved_view_t gray_view1=interleaved_view(iplwrapgray1.width() ,iplwrapgray1.height(),
gray8_interleaved_ptr(
reinterpret_cast(iplwrapgray1.pIplImage->imageData)
),
sizeof(unsigned char)* iplwrapgray1.pIplImage->widthStep);
std::copy(gray_view.begin(),gray_view.end(),gray_view1.begin());
cvShowImage( winName, iplwrapgray1.pIplImage );
std::cout << "Wait Key Input" << std::endl;
cvWaitKey(0);
x_gradient(gray_view,gray_view1);
cvShowImage( winName, iplwrapgray1.pIplImage );
std::cout << "Wait Key Input" << std::endl;
cvWaitKey(0);
gray8_interleaved_view_t gray_sub_view=subimage_view(gray_view, 20,30, 40,40);
iplimage_wrapper iplwrapgray2(40 ,40);
std::copy(gray_sub_view.begin(),gray_sub_view.end(),iplwrapgray2.begin());
cvShowImage( winName, iplwrapgray2.pIplImage );
std::cout << "Wait Key Input" << std::endl;
cvWaitKey(0);
gray8_interleaved_view_t gray_view2=interleaved_view(iplwrapgray2.width() ,iplwrapgray2.height(),
gray8_interleaved_ptr(
reinterpret_cast(iplwrapgray2.pIplImage->imageData)
),
sizeof(unsigned char)* iplwrapgray2.pIplImage->widthStep);
std::copy(gray_sub_view.begin(),gray_sub_view.end(),gray_view2.begin());
cvShowImage( winName, iplwrapgray2.pIplImage );
std::cout << "Wait Key Input" << std::endl;
cvWaitKey(0);
cvReleaseImage( &piplimg );
#endif
piplimg=cvLoadImage( "test.jpg");
cvShowImage( winName, piplimg );
std::cout << "Wait Key Input" << std::endl;
cvWaitKey(0);
typedef interleaved_ptr bgr8_interleaved_ptr;
typedef type_from_x_iterator::view_t bgr8_interleaved_view_t;
bgr8_interleaved_view_t bgr_view=interleaved_view(piplimg->widthStep/3 ,piplimg->height,
bgr8_interleaved_ptr(
reinterpret_cast(piplimg->imageData)
),
sizeof(unsigned char)*piplimg->widthStep
);
iplimage_wrapper iplwrapbgr1(piplimg->widthStep/3 ,piplimg->height);
std::copy(bgr_view.begin(),bgr_view.end(),iplwrapbgr1.begin());
cvShowImage( winName, iplwrapbgr1.pIplImage );
std::cout << "Wait Key Input" << std::endl;
cvWaitKey(0);
x_gradient(bgr_view,((bgr8_interleaved_view_t)iplwrapbgr1));
cvShowImage( winName, iplwrapbgr1.pIplImage );
std::cout << "Wait Key Input" << std::endl;
cvWaitKey(0);
bgr8_interleaved_view_t bgr_sub_view=subimage_view(bgr_view, 20,30, 40,40);
iplimage_wrapper iplwrapbgr2(40 ,40);
std::copy(bgr_sub_view.begin(),bgr_sub_view.end(),iplwrapbgr2.begin());
cvShowImage( winName, iplwrapbgr2.pIplImage );
std::cout << "Wait Key Input" << std::endl;
cvWaitKey(0);
cvReleaseImage( &piplimg );
return 0;
}
|
|
|
|

|
and plz add
---------------------------------
/************************************************************************/
/* */
/* Copyright 2006-2007 by Hirotaka Niitsuma */
/* */
/* */
/* This file is part of the STLLCV computer vision library. */
/* ( Version 0.7, 2006-10-31 ) */
/* You may use, modify, and distribute this software according */
/* to the terms stated in the LICENSE file included in */
/* the STLLCV distribution. */
/* */
/* The STLLCV Website is */
/* http://www2s.biglobe.ne.jp/~niitsuma/STLLCV/ */
/* Please direct questions, bug reports, and contributions to */
/* niitsuma@mub.biglobe.ne.jp */
/* */
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */
/* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
/* */
/************************************************************************/
|
|
|
|

|
Boost community will accept GIL( http://opensource.adobe.com/gil/ ) instead of vigra.
http://lists.boost.org/Archives/boost/2006/10/112316.php
>Having said that, I must say that I like Vigra a lot but I won't reject GIL
>on the ground of the elements in Vigra which can be considered to be better
>or which are missing in GIL.
>However, I do think that if GIL is accepted, it would be invaluable if
>Ullrich could bring in all his expertise and experience into the GIL team,
|
|
|
|

|
I upload current version
https://sourceforge.net/project/showfiles.php?group_id=171377
https://sourceforge.net/projects/stllcv
I will attend AAAI06
(July 15-21 Boston http://www.aaai.org/Conferences/AAAI/aaai06.php)
for my poster presentation
My poster presentation is not for this library.
But , I welcome discuss about this library.
|
|
|
|

|
There was no way I could have tell you were the author of STLLCV, and I still don't know if you really are.
All I know if you are Hirotaka Niitsuma (and I'm going to give you the benefit of the doubt), then the STLLCV represents work of monumental proportion!!
Because I did not have much time, I spent about 30 minutes looking through some of the classes, and they are truly amzing what you have done.
At an appropriate time in the future, I hope to return to review them in greater detail.
The lack of your true identity at the beginning was unfortunate! I just wish I could have voted again because I would give you a well deserved '5'. Your work easily merits it.
William
Fortes in fide et opere!
|
|
|
|

|
I appreciate your kind advice and vote.
|
|
|
|

|
if this was your work.
What you have done is simply alerted the readers of this community to these other websites that contain the materials you have included in your article.
The libraries are from those places, as do some of the text, and even the sample code you have shown, are from the STLLCV website.
I don't see anything significant here that is really and truly yours.
I'm giving you a generous '2' for simply alerting us to those websites.
William
Fortes in fide et opere!
|
|
|
|

|
>if this was your work
Yes.
hiron3hiron = Hirotaka Niitsuma.
The reason why I post this article to codeproject, is google does not hit my article with keyward OpenCV and STL.
Thus it is seem to there are no opportunity that appropriate parson can find this article and library.
-- modified at 21:17 Monday 31st October, 2005
|
|
|
|

|
It makes reading your article hard on the eyes.
Thanks.
William
Fortes in fide et opere!
|
|
|
|

|
Wrey, this seems to be somehow the problem with all those reader contributions
SkyWalker
|
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
STL like template based coding with the MMX/SSE extension using OpenCV, vigra, and boost.
| Type | Article |
| Licence | |
| First Posted | 30 Oct 2005 |
| Views | 88,006 |
| Bookmarked | 42 times |
|
|