kopia lustrzana https://github.com/F5OEO/rpitx
Some tweaks for spectrum painting
rodzic
fd71868432
commit
6801f2a580
|
@ -1,7 +1,9 @@
|
|||
raspistill -w 320 -h 256 -o picture.jpg -t 1
|
||||
#convert picture.jpg -flip -colors 16 -colorspace gray -dither -colorspace YUV picture.yuv
|
||||
convert picture.jpg -flip -colors 16 -colorspace gray -colorspace YUV picture.yuv
|
||||
sudo ./spectrumpaint picture.yuv 144.2e6
|
||||
#convert picture.jpg -flip -colors 16 -colorspace gray -colorspace YUV picture.yuv
|
||||
#convert BBC-Test-Card-F320x256.jpg -flip -quantize YUV -dither FloydSteinberg -colors 4 -interlace partition picture.yuv
|
||||
convert picture.jpg -flip -quantize YUV -dither FloydSteinberg -colors 4 -interlace partition picture.yuv
|
||||
sudo ./spectrumpaint picture.Y 434.0e6 100000
|
||||
|
||||
#convert -depth 8 picture.jpg picture.rgb
|
||||
|
||||
|
|
|
@ -34,22 +34,27 @@ void ProcessPicture(float Excursion)
|
|||
std::complex<float> sample[320];
|
||||
int Row;
|
||||
|
||||
|
||||
while(EndOfPicture==0)
|
||||
//while(1)
|
||||
{
|
||||
NbRead=read(FilePicture,Line,320);
|
||||
if(NbRead!=320) EndOfPicture=1;
|
||||
|
||||
|
||||
for(Row=0;Row<320;Row++)
|
||||
{
|
||||
sample[Row]=std::complex<float>((Row/320.0-0.5)*Excursion,(Line[Row])/4);
|
||||
|
||||
while(EndOfPicture==0)
|
||||
{
|
||||
NbRead=read(FilePicture,Line,320);
|
||||
if(NbRead!=320) EndOfPicture=1;
|
||||
|
||||
|
||||
for(Row=0;Row<320;Row++)
|
||||
{
|
||||
sample[Row]=std::complex<float>((Row/320.0-0.5)*Excursion,(Line[Row])/64);
|
||||
//sample[Row]=std::complex<float>((Row/320.0-0.5)*Excursion,(Row/320.0)*8);
|
||||
//fprintf(stderr,"%f ",sample[Row].imag());
|
||||
|
||||
}
|
||||
//fprintf(stderr,"\n");
|
||||
fmmod->SetIQSamples(sample,320,1);
|
||||
|
||||
}
|
||||
fmmod->SetIQSamples(sample,320,1);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue