-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to return a WebGLTexture as Texture to use it into the cables patch #951
Comments
sounds cool! would love to see this! you could output the canvas element and then use the op CanvasToTexture (or use the code from this op internally) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm coding a new op for face recognition using Haar Cascades. I'm using jsfeat library. I successfully created other op implementing jsfeat library in cables.
In the code, the op get a Texture as input, it converts it as canvas because I did it for the other ops and I'm not interested on performance; I'm doing it for didactic scope. As canvas, the code process the canvas' data and it does the face recognition. After that, I would like to draw the rectangles of the faces detected. I do it always using the image data of the canvas. After that, I created a variable called 'outputTexture' that contains the converted data from canvas to WebGLTexture type, using the gl.texImage2D() function.
I'm doing debugging of the results; the outputTexture variable contains correct data, but when I do the output of the data by setting the outTexture pin using the function outTexture.setRef(outputTexture), in the patch I always get a blank texture with all info values as Null.
I'm doing some mistakes?
There is a way to output the data as texture for using it in cables?
I pasted my entire code.
Thanks!
Enrico
The text was updated successfully, but these errors were encountered: