nedit was missing the xorg fonts
installing X.Org on my LMDE solved the problem
Development and system problems, basic solutions and workarounds / Platform : Linux, C,C++,OpenCV, OpenGL, SDL, SDL2, ffmpeg, Libav, Blackmagic acquisition
lundi 21 janvier 2013
mardi 15 janvier 2013
Linux Mint LMDE
Ubuntu 10.10 ppa is not accessible since beginning of 2013, I switched to Linux Mint Debian (LMDE) kernel version 3.2.0-2-amd64
Installed AMD driver legacy 12.6 compatible with the current kernel
Everything works fine
Installed AMD driver legacy 12.6 compatible with the current kernel
Everything works fine
vendredi 14 décembre 2012
jeudi 25 octobre 2012
global variables in C
the "not bad" way to define global variables in C
#ifdef FOO_LIBRARY_C
#define GLOBAL_PREFIX
#else
#define GLOBAL_PREFIX extern
#endif
GLOBAL_PREFIX int a,b,c
http://stackoverflow.com/questions/2868651/including-c-header-file-with-lots-of-global-variables
mardi 23 octobre 2012
lundi 15 octobre 2012
conversion HD uyvy -> RGB
i=0;
for (y=0;y<image.rows;y++)
{
uchar* ptr_cv= (uchar *)( image.ptr() + image.channels()*y * image.cols);
for (x=0;x<image.cols/2;x++)
{
U = pData[i]-128.0;
YY1 = 1.164*(pData[i+1]-16);
V = pData[i+2]-128.0;
YY2 = 1.164*(pData[i+3]-16);
i+=4;
B=YY1 + 1.793*U;
G=YY1 - 0.534*V- 0.213*U;
R=YY1 + 2.115*V;
if (R<0) R=0;if (G<0) G=0;if (B<0) B=0;
if (R>255) R=255;if (G>255) G=255;if (B>255) B=255;
j=2*image.channels()*x;
ptr_cv[j] = (unsigned char)B;
ptr_cv[j+1]= (unsigned char)G;
ptr_cv[j+2]= (unsigned char)R;
B=YY2 + 1.793*U;
G=YY2 - 0.534*V- 0.213*U;
R=YY2 + 2.115*V;
if (R<0) R=0;if (G<0) G=0;if (B<0) B=0;
if (R>255) R=255;if (G>255) G=255;if (B>255) B=255;
ptr_cv[j+3] = (unsigned char)B;
ptr_cv[j+4]= (unsigned char)G;
ptr_cv[j+5]= (unsigned char)R;
}
}
for (y=0;y<image.rows;y++)
{
uchar* ptr_cv= (uchar *)( image.ptr() + image.channels()*y * image.cols);
for (x=0;x<image.cols/2;x++)
{
U = pData[i]-128.0;
YY1 = 1.164*(pData[i+1]-16);
V = pData[i+2]-128.0;
YY2 = 1.164*(pData[i+3]-16);
i+=4;
B=YY1 + 1.793*U;
G=YY1 - 0.534*V- 0.213*U;
R=YY1 + 2.115*V;
if (R<0) R=0;if (G<0) G=0;if (B<0) B=0;
if (R>255) R=255;if (G>255) G=255;if (B>255) B=255;
j=2*image.channels()*x;
ptr_cv[j] = (unsigned char)B;
ptr_cv[j+1]= (unsigned char)G;
ptr_cv[j+2]= (unsigned char)R;
B=YY2 + 1.793*U;
G=YY2 - 0.534*V- 0.213*U;
R=YY2 + 2.115*V;
if (R<0) R=0;if (G<0) G=0;if (B<0) B=0;
if (R>255) R=255;if (G>255) G=255;if (B>255) B=255;
ptr_cv[j+3] = (unsigned char)B;
ptr_cv[j+4]= (unsigned char)G;
ptr_cv[j+5]= (unsigned char)R;
}
}
mercredi 22 août 2012
Inscription à :
Articles (Atom)