Skip to content

Instantly share code, notes, and snippets.

View toverux's full-sized avatar

Morgan Touverey Quilling toverux

View GitHub Profile
import numpy as np
import argparse
import glob
import cv2
import json
def auto_canny(image, sigma=0.33):
otsu_thresh_val, ret = cv2.threshold(image, 0, 255, cv2.THRESH_BINARY|cv2.THRESH_OTSU)
lower = otsu_thresh_val * 0.3
/**
* Fetches and constructs the breadcrumb of modules, starting from the last opened on the stack (startModuleId),
* tracing back to the root module, thanks to each module's parentId.
*
* @param startModuleId The last module you want to be opened in the breadcrumb.
*/
private fetchModules(startModuleId: AuditModule['_id']): Observable<AuditModule[]> {
//=> Each time we need to fetch a new module, we emit the wanted module id on this subject
const fetchIdSubject = new BehaviorSubject(startModuleId);