{"action":"created","issue":{"url":"https://api.github.com/repos/paviro/MMM-Facial-Recognition-Tools/issues/11","repository_url":"https://api.github.com/repos/paviro/MMM-Facial-Recognition-Tools","labels_url":"https://api.github.com/repos/paviro/MMM-Facial-Recognition-Tools/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/paviro/MMM-Facial-Recognition-Tools/issues/11/comments","events_url":"https://api.github.com/repos/paviro/MMM-Facial-Recognition-Tools/issues/11/events","html_url":"https://github.com/paviro/MMM-Facial-Recognition-Tools/issues/11","id":197917998,"number":11,"title":"facerecognition.py camera.read() crash","user":{"login":"Patrick-Remy","id":20044441,"avatar_url":"https://avatars.githubusercontent.com/u/20044441?v=3","gravatar_id":"","url":"https://api.github.com/users/Patrick-Remy","html_url":"https://github.com/Patrick-Remy","followers_url":"https://api.github.com/users/Patrick-Remy/followers","following_url":"https://api.github.com/users/Patrick-Remy/following{/other_user}","gists_url":"https://api.github.com/users/Patrick-Remy/gists{/gist_id}","starred_url":"https://api.github.com/users/Patrick-Remy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Patrick-Remy/subscriptions","organizations_url":"https://api.github.com/users/Patrick-Remy/orgs","repos_url":"https://api.github.com/users/Patrick-Remy/repos","events_url":"https://api.github.com/users/Patrick-Remy/events{/privacy}","received_events_url":"https://api.github.com/users/Patrick-Remy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-28T21:23:06Z","updated_at":"2016-12-28T21:39:42Z","closed_at":null,"body":"It seems like `camera.read()` isn't able to read images. It results in 0x0 images which cause the `cv2.cvtColor(frame, cv2.COLOR_RGB2GRAY)` to crash with:\r\n\r\n```\r\nLoading training data...\r\nALGORITHM: LBPH\r\nTraining data loaded!\r\n--------------------\r\nPicam ausgewählt...\r\nOpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /build/opencv-ISmtkH/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp, line 3737\r\nTraceback (most recent call last):\r\n  File \"facerecognition.py\", line 45, in <module>\r\n    image = cv2.cvtColor(frame, cv2.COLOR_RGB2GRAY)\r\ncv2.error: /build/opencv-ISmtkH/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp:3737: error: (-215) scn == 3 || scn == 4 in function cvtColor\r\n```\r\n\r\nI am using the Raspberry Pi 3 with v2 NoIR camera. Facetrainer does capturing well."},"comment":{"url":"https://api.github.com/repos/paviro/MMM-Facial-Recognition-Tools/issues/comments/269545208","html_url":"https://github.com/paviro/MMM-Facial-Recognition-Tools/issues/11#issuecomment-269545208","issue_url":"https://api.github.com/repos/paviro/MMM-Facial-Recognition-Tools/issues/11","id":269545208,"user":{"login":"paviro","id":992826,"avatar_url":"https://avatars.githubusercontent.com/u/992826?v=3","gravatar_id":"","url":"https://api.github.com/users/paviro","html_url":"https://github.com/paviro","followers_url":"https://api.github.com/users/paviro/followers","following_url":"https://api.github.com/users/paviro/following{/other_user}","gists_url":"https://api.github.com/users/paviro/gists{/gist_id}","starred_url":"https://api.github.com/users/paviro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paviro/subscriptions","organizations_url":"https://api.github.com/users/paviro/orgs","repos_url":"https://api.github.com/users/paviro/repos","events_url":"https://api.github.com/users/paviro/events{/privacy}","received_events_url":"https://api.github.com/users/paviro/received_events","type":"User","site_admin":false},"created_at":"2016-12-28T21:39:42Z","updated_at":"2016-12-28T21:39:42Z","body":"Thanks for the investigation I will look into this as soon as possible!"}}
{"actor":{"display_login":"paviro"}}