Hello, that's my first post, before you think "Alrealy exist a post with that topic" sorry, i din't find that.
Thats my problem, i'm trying to put a image processed on yolo with opencv, this image is a instance of a cv2.imread, i have found many examples with camera but dosen't work for me.
The idea is to get a image file on the computer and show it on a Image() widget, after that, the program send exactly the same image to a darknet (yolo) object detection, after the detection, this image will be saved on the same variable of the input, and so, the program must to take that image (remains a cv2.imread return) and show the result on the same Image() widget.
But it is resulting in a black screen...
Based on a kivy opencv camera example i reach on that code:
class Imagem(Image):
def build(self):
return Image()
def atualizaImagem(self, img):
imagem = img # cv2.imread image
buf1 = cv2.flip(imagem, 0)
buf = buf1.tostring()
texture1 = Texture.create(size=(imagem.shape[1], imagem.shape[0]), colorfmt='bgr')
texture1.blit_buffer(buf, colorfmt='bgr', bufferfmt='ubyte')
self.texture = texture1 # ends with a black image.
this object is what i use to build and manipulate a Image() widget. on another aplication that works, but in this no... (On another code is a simple Image() and Button(), when button is pressed the 'atualizarImage()' is runned.)
Maybe the problem is in a Image() widget be inside another boxLayout()?