× Benvenuti sul nostro forum su Sint Wind PI!

Postate qui domande o segnalate problemi / bug che riscontrate,

file Raspberry PI Camera Board

More
10 years 10 months ago #966 by alegrechi
Replied by alegrechi on topic Raspberry PI Camera Board
Sembra funzionare ! :) Domani col giorno farò ulteriori prove !

Un paio di domande:

ho visto che la camera pi usa i parametri relativi alla sezione webcam.

Per quanto riguarda il postprocessing (ridimensionamento, ecc) usa i programmi standard (ffmpeg) oppure i parametri di raspistill ?
Credo che, almeno per quanto riguarda il ridimensionamento, utilizzare il raspistill quanto più possibile eviterebbe perdita di qualità finale...

Please Log in to join the conversation.

  • tetox
  • tetox's Avatar
  • Visitor
  • Visitor
10 years 10 months ago - 10 years 10 months ago #967 by tetox
Replied by tetox on topic Raspberry PI Camera Board
Ciao..Ale..
Io l'ho gia' provato ...vedi msg. n#878 di questa stessa discussione ..
Stefano
Last edit: 10 years 10 months ago by tetox.

Please Log in to join the conversation.

More
10 years 10 months ago #969 by tony
Replied by tony on topic Raspberry PI Camera Board
Non ho ancora ben visto i parametri raspstill. Comunque il programma se trova l'immagine della stessa dimensione richiesta non fà nulla.
Qunsdi oltre e metterli in "camera_final_res" vanno messi anche in quelli di raspstill

Please Log in to join the conversation.

More
10 years 10 months ago #980 by alegrechi
Replied by alegrechi on topic Raspberry PI Camera Board
Ok come risultati non c'è male direi :)

Alcune considerazioni:

- ho rimosso il -hf dal sorgente, in quanto per il mio orientamento non lo utilizzavo. Credo che sia meglio mettere tutti i parametri nel config, in ogni caso.

Attualmente mi sembra avere buoni risultati con questa stringa opzioni (daylight)

-n -w 1024 -h 768 -ex auto -ev -5 -mm average

"-n" disabilita l'anteprima dello scatto (a noi non serve), gli altri ridimensionano nativamente, ex è l'esposizione audo e ev è la correzione dell'esposizione (ho dovuto sottoesporre altrimenti il cielo mi veniva troppo chiaro /bruciato) -mm è il metodo di misura dell'esposizione.

Inoltre credo sia il caso di disabilitare il led rosso che si accende durante lo scatto.

Dovrebbe bastare editare il file /boot/config.txt inserendo la riga
disable_camera_led=1
Attachments:

Please Log in to join the conversation.

More
10 years 10 months ago #983 by tony
Replied by tony on topic Raspberry PI Camera Board
ok allora l"hf" lo tolgo. Avevo capito servisse per mirrorare l'immagine che di sue e roveciata ... ?????

Please Log in to join the conversation.

More
10 years 10 months ago #984 by alegrechi
Replied by alegrechi on topic Raspberry PI Camera Board
Si ma ovviamente dipende da come posizioni la camera rispetto al sensore!

Nel mio caso viene giusto senza... (poi ho aggiunto una rotazione di 90°...)

Please Log in to join the conversation.

More
10 years 10 months ago - 10 years 10 months ago #991 by alegrechi
Replied by alegrechi on topic Raspberry PI Camera Board
Domanda al volo: ma il giorno/notte quando dovrebbe scattare?

Perchè sono le 21.41 e ancora usa il daylight... :)

EDIT: ecco switchato ora per la prima volta alle 21:48... forse un po' tardino!
Last edit: 10 years 10 months ago by alegrechi.

Please Log in to join the conversation.

More
10 years 10 months ago #992 by tony
Replied by tony on topic Raspberry PI Camera Board
Scatta 1 ora dopo il tramonto ( e un'ora prima dell'alba ).
Se li metti dopo, specialmente con delle fotocamere digitali,le immagini serali vengono bruciate.
The following user(s) said Thank You: alegrechi

Please Log in to join the conversation.

More
10 years 10 months ago #993 by tony
Replied by tony on topic Raspberry PI Camera Board
Questo è riuscito ad allungare il cavo della camera

www.fishpi.org/forum/viewtopic.php?f=12&...267af6350a138fdf1087

Please Log in to join the conversation.

More
10 years 10 months ago #994 by alegrechi
Replied by alegrechi on topic Raspberry PI Camera Board

tony wrote: Questo è riuscito ad allungare il cavo della camera

www.fishpi.org/forum/viewtopic.php?f=12&...267af6350a138fdf1087


Figo non ne ero a conoscenza... in pratica con due di queste schedine da 5£ si riesce ad estendere il cavo! Sarebbe da provare :)

Please Log in to join the conversation.

More
10 years 10 months ago #1109 by alegrechi
Replied by alegrechi on topic Raspberry PI Camera Board
Ho montato tutto dentro una scatola stagna con l'intenzione di procedere quanto prima alla sistemazione esterna. In attesa di trovare il tempo di scrivere un post più completo vi allego qualche foto della mia realizzazione :)

Ho fatto un piccolo forellino sul coperchio della scatola e ci ho applicato la camera con un pezzetto di schiuma da imballaggio (ad incastro). Davanti ho messo un vetrino e sigillato.

Dentro ho piazzato tutto: raspberry con i sensori, alimentatore (ho utilizzato un 5v - 2A che avevo, di quelli da hard disk, in modo che la corrente sia sufficiente anche per l'hub), hub alimentato/modificato da me con chiavetta wifi.
Devo dire che il tutto funziona incredibilmente bene, comprese le immagini della cam !

Mi rimane un solo grosso dubbio: ho paura che le temperature interne alla scatola diventino molto elevate una volta messa fuori sotto il sole. Inoltre sia il Rasp che l'alimentatore (soprattutto) un po' scaldano.
Ho pensato di aggiungere una ventilazione con una ventolina da pc azionata dal rasp/swpi via GPIO, ma andrei sicuramente a compromettere l'impermeabilità della scatola.
Voi avete esperienze in questo senso? che mi consigliate di fare?
Attachments:
The following user(s) said Thank You: tony

Please Log in to join the conversation.

More
10 years 10 months ago #1115 by SkizZO
Replied by SkizZO on topic Raspberry PI Camera Board
Fa un tubo a J capovolta che esce dalla scatola e stai a posto ;) (J e non U, così l'aria calda esce meglio passivamente)

In teoria dovresti anche fare un buco d'entrata sotto, magari ci metti sempre il tubo con materiale per far passare solo aria (tipo retina dei confetti...)

;) la ventolina non credo serva, il primo giorno il l'avevo chiusa e raggiunse i 51°C, ora con un buco solo sopra raggiunge i 38 di picco (e ci va anche il sole sopra)
The following user(s) said Thank You: alegrechi, zippo68

Please Log in to join the conversation.

More
10 years 10 months ago #1127 by Roberto Vaccaro
Ciao Tony
mi puoi spiegare come fai a inserire i dati nell'intestazione e nel piè dell'immagine (raspi.jpg).
Volevo modificarli ma non ho trovato.

Please Log in to join the conversation.

More
10 years 10 months ago #1133 by tony
Replied by tony on topic Raspberry PI Camera Board

Roberto Vaccaro wrote: Ciao Tony
mi puoi spiegare come fai a inserire i dati nell'intestazione e nel piè dell'immagine (raspi.jpg).
Volevo modificarli ma non ho trovato.


TTLib.py -> addTextandResizePhoto()
The following user(s) said Thank You: Roberto Vaccaro

Please Log in to join the conversation.

More
10 years 10 months ago #1134 by Roberto Vaccaro
Ottimo
Grazie

Please Log in to join the conversation.

More
10 years 10 months ago #1135 by tony
Replied by tony on topic Raspberry PI Camera Board
Cosa vuoi aggiungere ?

Please Log in to join the conversation.

More
10 years 10 months ago #1136 by Roberto Vaccaro
Volevo aggiungere la pioggia e modificare l'intestazione del mio sito col numero del risponditore

Please Log in to join the conversation.

More
10 years 10 months ago #1137 by tony
Replied by tony on topic Raspberry PI Camera Board
Per l'intestazione lo puoi fare con il parametro "logo". La pioggia invece effettivamente manca.

Please Log in to join the conversation.

More
10 years 10 months ago #1138 by Roberto Vaccaro
Ok domani provo con calma.
Prima l'ho fatto ma mi dice che non riconosce la global var.

Please Log in to join the conversation.

More
10 years 10 months ago - 10 years 10 months ago #1142 by Roberto Vaccaro
:( Niente con la mia scarsa conoscenza di Pyton non riesco a inserire la pioggia.
Ho sempre questo errore:
Traceback (most recent call last):
  File "swpi.py", line 15, in <module>
    import humod
  File "/home/pi/swpi/humod.py", line 20, in <module>
    import errors
  File "/home/pi/swpi/errors.py", line 12, in <module>
    from TTLib import *
  File "/home/pi/swpi/TTLib.py", line 601
    text = text + "Pioggia di oggi : %d" % globalvars.meteo_data.rain_rate  + " mm "

Meglio dedicarmi all'hardware ;)
Last edit: 10 years 10 months ago by Roberto Vaccaro.

Please Log in to join the conversation.

More
10 years 10 months ago #1143 by tony
Replied by tony on topic Raspberry PI Camera Board
Non ti preoccupare .. la metto io in coda alle cose da fare :-)

Please Log in to join the conversation.

More
10 years 10 months ago #1167 by tony
Replied by tony on topic Raspberry PI Camera Board
Aggiunta la pioggia giornaliera sulle foto !
The following user(s) said Thank You: Roberto Vaccaro

Please Log in to join the conversation.

More
10 years 10 months ago #1169 by Roberto Vaccaro
Grazie. Funziona !
Dovresti levare dal file camearaPI.py il parametro -hf
###########################################################################
#     Sint Wind PI
# 	  Copyright 2012 by Tonino Tarsi <tony.tarsi@gmail.com>
#   
#     Please refer to the LICENSE file for conditions 
#     Visit http://www.vololiberomontecucco.it
# 
##########################################################################
"""Classes and methods for handling cameraPI commands."""

import sqlite3
import Image
import ImageFont
import ImageDraw
import time
import os
from TTLib  import *
import sun
import math

class cameraPI(object):
	"""Class defining generic webcams."""

	def __init__(self, cfg):
		self.cfg = cfg
		self.god=sun.sun(lat=cfg.location_latitude,long=cfg.location_longitude)
	
	def capture(self,filename):
		if ( self.god.daylight() ):
			options = self.cfg.cameraPI_day_settings
			log("CameraPI - Using Dayligth settings" + options)
		else:
			options = self.cfg.cameraPI_night_settings
			log("CameraPI - Using Nigth settings" + options)
		try:
			snapCommand = "raspistill %s -o %s" %  (options,filename)
			#snapCommand = "raspistill -hf %s -o %s" %  (options,filename)
			#log( "Getting images with command : " + snapCommand)
			os.system(snapCommand )

			if ( not os.path.isfile(filename)):
				log( "ERROR in capturing webcam image on : " + self.device )
				return False
					
			return True
		except ValueError:
			log( " ERROR in capturing cameraPI image on : " + self.device )
			return False


io ho commentato la riga e l'ho riscritta.
Se la telecamera si monta come dovrebbe essere non serve, fa l'immagine speculare. Poi eventualmente può essere necessaria una rotazione ;) .

Please Log in to join the conversation.

More
10 years 10 months ago #1170 by tony
Replied by tony on topic Raspberry PI Camera Board
Si , Me ne ero dimenticato .. fatto

Please Log in to join the conversation.

More
10 years 10 months ago #1179 by Roberto Vaccaro

tony wrote: Aggiunta la pioggia giornaliera sulle foto !


Funziona, ma bisognerebbe implementare almeno un decimale.
Se la pioggia è 0,8 mm si vede solo 0

Please Log in to join the conversation.

More
10 years 10 months ago #1193 by alegrechi
Replied by alegrechi on topic Raspberry PI Camera Board
Ho impostato la modalità che invia tutte le immagini scattate su FTP, ma vorrei avere comunque anche l'immagine dell'ultimo scatto (raspi.jpg) in modo da avere un indirizzo fisso per il live.

E' possibile Tony ?

Please Log in to join the conversation.

More
10 years 10 months ago #1194 by tony
Replied by tony on topic Raspberry PI Camera Board
sono in Canada e quindi rispondo con.difficoltà in questi gg. prova a vedere se il file swpi_camera1.php può risolvere il problema ...

Please Log in to join the conversation.

More
10 years 10 months ago #1195 by alegrechi
Replied by alegrechi on topic Raspberry PI Camera Board

tony wrote: sono in Canada e quindi rispondo con.difficoltà in questi gg. prova a vedere se il file swpi_camera1.php può risolvere il problema ...


Avevo già pensato a tirare fuori la jpg facendo l'output dal php con quacosa del tipo
header('Content-type: image/jpeg');
readfile($theimg);

Ma non mi funziona e non riesco a venirne a capo. Se qualcuno ha qualche suggerimento è ben accetto! :)

Please Log in to join the conversation.

More
10 years 10 months ago #1196 by Roberto Vaccaro
Confermo quello che ti ha detto Tony
Questo è già modificato per la raspicam e funziona:
<?php
$data = date("dmY");
$files = glob("./img/raspi_".$data."*.jpg");
rsort ($files);
if (sizeof($files) > 0 ) {
$theimg= '"'.$files[0].'"';
}
else {
$theimg = '"./image/no-immagine.jpg"';
}
$type = 'image/jpeg';
header('Content-Type:'.$type);
header('Content-Length: ' . filesize($theimg));
readfile($theimg);
// echo '<A HREF=';    echo $theimg;    echo '><IMG SRC='; echo $theimg; echo '  WIDTH="650px" >' ; echo '</A>' ;
// echo "\n";
?>

è sufficiente modificare la terza riga col percorso di dove sono le immagini e il suffisso del nome col quale le salvi.
Visualizzerai sempre l'ultima.
Puoi salvarlo col nome che più ti piace, io l'ho chiamato swpi_raspi.php

Please Log in to join the conversation.

More
10 years 10 months ago - 10 years 10 months ago #1197 by tony
Replied by tony on topic Raspberry PI Camera Board
prova a riscaricare server.zip e vedi il file che ti dicevo. fa esattamente quello. se non è così è perché mi sono dimenticato di aggiornarlo .... te lo.mando .... fammi sapere
Last edit: 10 years 10 months ago by tony.

Please Log in to join the conversation.

Time to create page: 0.734 seconds