#raspberry pi HQ cam
26 messages ยท Page 1 of 1 (latest)
yeh I used one for ages. It's not very good to be honest
I also wrote an ASCOM driver for it https://github.com/IanCassTwo/rpicam-ascom-alpaca
ok nice ๐
yea i don't expect that much from it but id like to test it on planetary but mainly id like do build my own tracking with it
ok let me know if that software is useful to you
i think not, even though it is a precise answer to my initial question, so thanks for that ๐
i seems like a realy usefull tool in gerneral, so i'd say good job,
but i like to build everything from scratch, so i'm looking for a more basic way to acces the camera
for the guiding for example i thought about python with opencv, but maybe you have a better idea which is faster
Are you talking about turning the video raw data to something useful? I did manage to write a small program to do that poorly, and it does compress it down to 8 bit from 12 or 10.
I believe the proper way to do things is to use dcraw but not entirely sure how to.
i'd like to do two separate things (maybe shoudl have written that initialy xD)
- get raws in full resolution out as fast as possible and store them on the pi itself or external harddrive as some usefull rawformat.
- build my own guiding, current idea here is python and opencv for the image processig
Here is the code if you want
import time
from PIL import Image
class rawDataToPicture:
def __init__(self):
pass
#video frames should be split into individual files
def rawDataToPreviewPicture(self,inpath, outpath, width, height, stride, bitdepth):
with open(path, "rb") as rawFile:
ono = bytearray(rawFile.read(-1))
img1 = Image.frombytes('L',(stride,height), bytes(ono))
#crop black bits from unused part of sensor
#should probably do black level but i don't know how or why
cropWidth = width * (bitdepth / 8)
cropArea = (0,0,int(cropWidth),height)
img1 = img1.crop(cropArea)
ono = bytearray(img1.tobytes())
if(bitdepth != 8):
#strip every xth line containing end bits
#turns images into 8 bit but perfectly fine for preview
if(bitdepth == 10):
k = 5
if(bitdepth == 12):
k = 3
del ono[k-1::k]
imgu = Image.frombytes('L',(width,height), bytes(ono))
imgu.show()
imgu.save(outpath + '.bmp')
rDTP = rawDataToPicture()
#should read this from settings file, or string
start = time.time()
#should be absolute path I think
path = '1223inaTest00000.raw'
outputpath ='1223outInaTest00000'
#input file path, output file path, width, height, stride, bitdepth
#rDTP.rawDataToPreviewPicture(path,outputpath,1665,990,1696,10)
rDTP.rawDataToPreviewPicture(path,outputpath,4056,3040,6112,12)
end = time.time()
print(end - start)
I think the lib camera still outputting bmp is good enough, pretty sure its not compressed.
good to have, thanks ๐
i read something about a more optimal way with raspyraw or something which is capable of getting higher frame rates, hm but i can't find it now
sounds like you're trying to reinvent the wheel ๐ฎ
anyway, this is what you need if you want to use Python https://github.com/raspberrypi/picamera2
maybe, but sometimes thats the fun part
yeah, i have but until now i use it as a microscope camera. I didnt know it only able to do 4k stillframes.
why dont you just record in uncompressed avi and get the pics via pipp
im working on getting it record 1440p still its a lot of bandwith issue through using raspi zero and usb2.0
oh nice, so is there a simple commandline command which captures raw video?
No, the best you get is uncompressed Avi or an 12bit uncrompessed DNG
if you have a Jetson board the best there is 4k 30fps but not uncompressed
Ican just adapt little things sofar, If you want to have more i suggest learning coding.
i managed to force 1440p output but is at best unreliable and the camera shuts down quite often.
the csi a cable is also a bottle neck