Open jakemarotta opened 4 years ago
import cv2 import sys
cascPath = sys.argv[1] faceCascade = cv2.CascadeClassifier(cascPath)
video_capture = cv2.VideoCapture(0)
while True:
ret, frame = video_capture.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(
gray,
scaleFactor=1.1,
minNeighbors=5,
minSize=(30, 30),
flags=cv2.cv.CV_HAAR_SCALE_IMAGE > add > data run function
)
# Draw a rectangle around the faces
for (x, y, w, h) in faces:
cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2)
# Display the resulting frame
cv2.imshow('Video', frame)
if cv2.waitKey(1) & 0xFF == ord('q'): break
break
function importStylesheet(name, options) {
if (!name.endsWith (".css")) name += ".css" < run >
return new Handlebars.SafeString({#asset $;global.__root Directory}/reports/stylesheets/${name < add > other > }}
);
import cv2 import sys
cascPath = sys.argv[1] faceCascade = cv2.CascadeClassifier(cascPath)
video_capture = cv2.VideoCapture(0)
while True:
ret, frame = video_capture.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(
gray,
scaleFactor=1.1,
minNeighbors=5,
minSize=(30, 30),
flags=cv2.cv.CV_HAAR_SCALE_IMAGE
)
# Draw a rectangle around the faces
for (x, y, w, h) in faces:
cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2)
# Display the resulting frame
cv2.imshow('Video', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
video_capture.release() cv2.destroyAllWindows() ,,import cv2 import sys
cascPath = sys.argv[1] faceCascade = cv2.CascadeClassifier(cascPath) ,,video_capture = cv2.VideoCapture(0) ,,while True:
ret, frame = video_capture.read()
,, # Capture frame-by-frame ret, frame = video_capture.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(
gray,
scaleFactor=1.1,
minNeighbors=5,
minSize=(30, 30),
flags=cv2.cv.CV_HAAR_SCALE_IMAGE
)
# Draw a rectangle around the faces
for (x, y, w, h) in faces:
cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2)
# Display the resulting frame
cv2.imshow('Video', frame)
,, if cv2.waitKey(1) & 0xFF == ord('q'): break ,,# When everything is done, release the capture video_capture.release() cv2.destroyAllWindows() ,import cv2 import sys
cascPath = sys.argv[1] faceCascade = cv2.CascadeClassifier(cascPath)
video_capture = cv2.VideoCapture(0)
while True:
ret, frame = video_capture.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(
gray,
scaleFactor=1.1,
minNeighbors=5,
minSize=(30, 30),
flags=cv2.cv.CV_HAAR_SCALE_IMAGE
)
# Draw a rectangle around the faces
for (x, y, w, h) in faces:
cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2)
# Display the resulting frame
cv2.imshow('Video', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
video_capture.release() cv2.destroyAllWindows() ,,import cv2 import sys
cascPath = sys.argv[1] faceCascade = cv2.CascadeClassifier(cascPath) ,,video_capture = cv2.VideoCapture(0) ,,while True:
ret, frame = video_capture.read()
,, # Capture frame-by-frame ret, frame = video_capture.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(
gray,
scaleFactor=1.1,
minNeighbors=5,
minSize=(30, 30),
flags=cv2.cv.CV_HAAR_SCALE_IMAGE
) function run data add value select
# Draw a rectangle around the faces
for (x, y, w, h) in faces:
cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2)
# Display the resulting frame
cv2.imshow('Video', frame)
,, if cv2.waitKey(1) & 0xFF == ord('q'): break ,,# When everything is done, release the capture video_capture.release() cv2.destroyAllWindows() , function run data value select import cv2 import sys
cascPath = sys.argv[1] faceCascade = cv2.CascadeClassifier(cascPath)
video_capture = cv2.VideoCapture(0)
while True:
ret, frame = video_capture.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(
gray,
scaleFactor=1.1,
minNeighbors=5,
minSize=(30, 30),
flags=cv2.cv.CV_HAAR_SCALE_IMAGE
)
# Draw a rectangle around the faces
for (x, y, w, h) in faces:
cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2)
# Display the resulting frame
cv2.imshow('Video', frame) add (video; frame)
Image logical select data add select condition
if cv2.waitKey(1) & 0xFF == ord('q'):
break
video_capture.release() cv2.destroyAllWindows() ,,import cv2 import sys
cascPath = sys.argv[1] faceCascade = cv2.CascadeClassifier(cascPath) ,,video_capture = cv2.VideoCapture(0) ,,while True:
ret, frame = video_capture.read()
,, # Capture frame-by-frame ret, frame = video_capture.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(
gray,
scaleFactor=1.1,
minNeighbors=5,
minSize=(30, 30),
flags=cv2.cv.CV_HAAR_SCALE_IMAGE
) function run data add select
# Draw a rectangle around the faces
for (x, y, w, h) in faces:
cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2)
# Display the resulting frame
cv2.imshow('Video', frame)
,, if cv2.waitKey(1) & 0xFF == ord('q'): break ,,# When everything is done, release the capture video_capture.release() cv2.destroyAllWindows()
( x,y,)
Hi,
I'm trying to use jsreport-core, jsreport-handlebars, and jsreport-phantom-pdf to render a pdf file with a footer. I'm able to use the data from the main template, but it doesn't seem recognize the same helpers in the footer. Is there something I need to put in the configuration to make that happen? Any help would be greatly appreciated.
OS: Windows 10 Node Version: v12.13.1
Dependency versions: "jsreport-assets": "^1.5.1", "jsreport-core": "^2.7.2", "jsreport-handlebars": "^2.1.0", "jsreport-html-to-xlsx": "^2.6.0", "jsreport-phantom-pdf": "^2.4.2", "jsreport-xlsx": "^2.3.0",
Here's the log output from jsreport:
The jsreport initialization:
The template object:
The main template (abridged):
The footer template:
The report's helpers file:
And the shared "util" helpers file being required: