I have this simple app that I opens webcam and processes the frames using
OpenCV. In my views.py I have the following code:
def processImage():
while True:
rval, frame = settings.CAP.read() //Read frames from webcam
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2G
I Alex.
I believe that is not possible with Django views. Views are made for
request-response, i.e. the client sends a request, the view returns a
response, and that's it, end of connection.
In your case, the server has a stream of data that you want to constantly
send to the client. This sounds
On Fri, Nov 15, 2013 at 12:08 PM, Jorge Cardoso Leitão
wrote:
> I believe that is not possible with Django views. Views are made for
> request-response, i.e. the client sends a request, the view returns a
> response, and that's it, end of connection.
i think the WSGI standard does support it, by
Hi there,
I don't know if it's relevant, I've never used it, but the name sounds
promising:
StreamingHttpResponse
https://docs.djangoproject.com/en/dev/ref/request-response/#streaminghttpresponse-objects
Cheers,
Tom
Dne Fri, 15 Nov 2013 12:53:23 -0500
Javier Guerra Giraldez napsal(a):
> On
Dear all,
Thank you for the help. I managed to setup StreamingHttpResponse to read
the images from the media folder. However I believe that there is a syntax
error with html code . It doesn't display the image. Any help? I am
attaching the code below.Thanks in advance!
def stream_response_gene
So thanks to Simon I was able to make this work. Here is the code for those
who might be interested:
yield ""
yield ''
yield "\n"
rval, frame = settings.CAP.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.imwrite('media/image.jpeg', gray, [int(cv2.IMWRITE_JP
What are you trying to do? Typical approach would be to use Javascript to pull
the images. Take a look at dajaxice.
—
Sent from Mailbox for iPhone
On Mon, Nov 18, 2013 at 1:57 PM, Alex Karargyris
wrote:
> So thanks to Simon I was able to make this work. Here is the code for those
> who m
7 matches
Mail list logo