kopia lustrzana https://github.com/projecthorus/wenet
More small updates.
rodzic
2afb7bdcdd
commit
1abf29a96e
|
@ -21,7 +21,7 @@ try:
|
||||||
_ldpc_enc.encode.restype = None
|
_ldpc_enc.encode.restype = None
|
||||||
_ldpc_enc.encode.argtypes = (ndpointer(ctypes.c_ubyte, flags="C_CONTIGUOUS"), ndpointer(ctypes.c_ubyte, flags="C_CONTIGUOUS"))
|
_ldpc_enc.encode.argtypes = (ndpointer(ctypes.c_ubyte, flags="C_CONTIGUOUS"), ndpointer(ctypes.c_ubyte, flags="C_CONTIGUOUS"))
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
raise OSError("Could not find ldpc_enc.so! Have you compiled ldpc_enc.c?")
|
print("WARNING: Could not find ldpc_enc.so! Have you compiled ldpc_enc.c? \n gcc -fPIC -shared -o ldpc_enc.so ldpc_enc.c")
|
||||||
|
|
||||||
#
|
#
|
||||||
# LDPC Encoder.
|
# LDPC Encoder.
|
||||||
|
|
|
@ -115,5 +115,5 @@ if __name__ == '__main__':
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print("Using callsign: %s" % callsign)
|
print("Using callsign: %s" % callsign)
|
||||||
|
|
||||||
ssdv_dir_watcher(callsign=callsign)
|
ssdv_dir_watcher(callsign=callsign)
|
|
@ -18,18 +18,18 @@ temp_file_prefix = "./temp_pic"
|
||||||
def capture_single(filename="temp.jpg"):
|
def capture_single(filename="temp.jpg"):
|
||||||
os.system(picam_str % filename)
|
os.system(picam_str % filename)
|
||||||
|
|
||||||
def capture_multiple(filename="output.jpg", n=5, temp_prefix=temp_file_prefix):
|
def capture_multiple(filename="output.jpg", n=5, temp_prefix=temp_file_prefix, debug_ptr = None):
|
||||||
# Remove any existing temporary images
|
# Remove any existing temporary images
|
||||||
os.system("rm %s*.jpg"%temp_prefix)
|
os.system("rm %s*.jpg"%temp_prefix)
|
||||||
|
|
||||||
# Capture n images
|
# Capture n images
|
||||||
for pic_num in range(n):
|
for pic_num in range(n):
|
||||||
write_debug_message("Capturing Image %d of %d..." % (pic_num, n))
|
debug_ptr("Capturing Image %d of %d..." % (pic_num, n))
|
||||||
capture_single("%s_%d.jpg"%(temp_prefix,pic_num))
|
capture_single("%s_%d.jpg"%(temp_prefix,pic_num))
|
||||||
|
|
||||||
# Super high-tech image quality recognition filter
|
# Super high-tech image quality recognition filter
|
||||||
# (pick the largest image... thanks daveake!)
|
# (pick the largest image... thanks daveake!)
|
||||||
write_debug_message("Choosing Best Image...")
|
debug_ptr("Choosing Best Image...")
|
||||||
pic_list = glob.glob("%s*.jpg"%temp_prefix)
|
pic_list = glob.glob("%s*.jpg"%temp_prefix)
|
||||||
pic_sizes = []
|
pic_sizes = []
|
||||||
for pic in pic_list:
|
for pic in pic_list:
|
||||||
|
|
Ładowanie…
Reference in New Issue