photo

open cv error: (-215) scn == 3 || scn == 4 in function cvtColor

别来无恙 提交于 2019-11-26 17:30:48
I'm currently in Ubuntu 14.04, using python 2.7 and cv2. When I run this code: import numpy as np import cv2 img = cv2.imread('2015-05-27-191152.jpg',0) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) it returns: File "face_detection.py", line 11, in <module> gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) cv2.error: /home/arthurckl/Desktop/opencv-3.0.0-rc1/modules/imgproc/src/color.cpp:7564: error: (-215) scn == 3 || scn == 4 in function cvtColor I already searched here and one answer said that I could be loading my photo the wrong way, because it should have 3 dimensions: rows, columns and depth.

How can I update the Android Gallery after a photo?

孤者浪人 提交于 2019-11-26 16:56:20
问题 For the university i've to develop an application on android with the face detections. For this i've to save various photo on my gallery. The problem is that after saving the photo, the gallery do not update. More precisely, if I delete the directory where I'm going to save the image, I open the application and shoot the photo, then going into the gallery and after an "update" I see the photo. But once I have the directory, if I take a new picture, this did not overwrite the old one. Online i

iPhone SDK - How to disable the picture preview in UIImagePickerController?

拜拜、爱过 提交于 2019-11-26 15:49:23
问题 Is there any way to disable the image preview after taking a picture with the UIImagePickerController? I want to dismiss the ImagePicker as soon as the user pressed the shutter release button. 回答1: I asked a similar question here My solution was to create a customized view on top of the default UIImagePickerControllerView. I downloaded the example Augmented Reality Then you can use the OverlayView.m and OverlayView.h by adding them to your project: I made the custom picker toolbar, picker and

Can I set a users profile image using the Facebook API?

。_饼干妹妹 提交于 2019-11-26 08:13:05
问题 I\'m looking for a user.setImage call or something to that effect on the Facebook API but I can\'t see anything to achieve this: specifically to overwrite a user\'s profile image (not just post an image on their wall). I can\'t see anything in the docs. Do you know if this is possible and if so any docs on implementing it? 回答1: You can redirect the user to the following link where [PID] stands for the id of the desired picture: http://www.facebook.com/photo.php?fbid=[PID]&makeprofile=1 On

iOS taking photo programmatically

a 夏天 提交于 2019-11-26 08:12:24
问题 I know this is possible, saw this in some apps (iGotYa is I believe the most famous). I know how to set up everything for taking photos, saving it and everything. But how can it be done programmatically? just having the user click some button (in the regular view controller) and it will automatically take a picture using the front camera and saving it (or not, just getting it as a UIImage) Thanks! 回答1: This is very simple, just use the AVFoundation reference guide: https://developer.apple.com

Upload photo to Facebook with Facebook Android SDK in Android

笑着哭i 提交于 2019-11-26 05:54:03
问题 I\'m new to Android. I\'m searching for load photo to facebook by authorization, getting access_token. How to do this? Please give me a sample code in Java. 回答1: Just posted here the simple way to upload a photo: android facebook publish photo Code: byte[] data = null; Bitmap bi = BitmapFactory.decodeFile(photoToPost); ByteArrayOutputStream baos = new ByteArrayOutputStream(); bi.compress(Bitmap.CompressFormat.JPEG, 100, baos); data = baos.toByteArray(); Bundle params = new Bundle(); params

open cv error: (-215) scn == 3 || scn == 4 in function cvtColor

こ雲淡風輕ζ 提交于 2019-11-26 05:27:30
问题 I\'m currently in Ubuntu 14.04, using python 2.7 and cv2. When I run this code: import numpy as np import cv2 img = cv2.imread(\'2015-05-27-191152.jpg\',0) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) it returns: File \"face_detection.py\", line 11, in <module> gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) cv2.error: /home/arthurckl/Desktop/opencv-3.0.0-rc1/modules/imgproc/src/color.cpp:7564: error: (-215) scn == 3 || scn == 4 in function cvtColor I already searched here and one answer said