I don't think I'm copying back and forth. Maybe I misinterpreted the call to cvSetData( img , &view.begin()[0] , num_channels<View>::value * view.width() * sizeof( channel_t ));
Can you get access to the image buffer, scanline length, etc? These should do the trick: uchar * QImage::bits () const uchar * QImage::bits () const int QImage::bytesPerLine () const int QImage::depth () const QImage::Format QImage::format () const int QImage::height () const int QImage::width () const
So I can get a pointer to the image buffer. In the case of an ARGB8 image this
pointer can be cast to QRgb* (which is a typedef for unsigned int).
A (class modelling) PixelIteratorConcept should return a (class modelling)
PixelConcept on dereference. unsigned int does not model PixelConcept, so I
suppose I need to create a proxy class that does model PixelConcept...
What I need to implement is this (please correct me if I'm mistaken):
// a pixel in a QImage
// models PixelConcept
template