Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. camera
    Log in to post

    • SOLVED Qt and Android - How to launch camera by using Qandroidjniobject
      Mobile and Embedded • android qt creator camera qandroidjniobje qtandroid • • HemantZ  

      2
      0
      Votes
      2
      Posts
      121
      Views

      I solved this above problem in Qt by using Qandroidjniobject. For launching camera by using intent code is given below, QAndroidJniObject ACTION_IMAGE_CAPTURE = QAndroidJniObject::getStaticObjectField("android/provider/MediaStore", "ACTION_IMAGE_CAPTURE", "Ljava/lang/String;"); QAndroidJniObject intent("android/content/Intent", "(Ljava/lang/String;)V", ACTION_IMAGE_CAPTURE.object<jstring>()); QtAndroid::startActivity(intent.object<jobject>(), 101, this);
    • UNSOLVED QML Camera works strange in Linux Framebuffer
      QML and Qt Quick • qml embedded camera • • MintogoDeveloper  

      1
      0
      Votes
      1
      Posts
      93
      Views

      No one has replied

    • UNSOLVED How to use Smartphone Hardware in Qt Android App ?
      Mobile and Embedded • android camera gps app sensor • • Domo93  

      3
      0
      Votes
      3
      Posts
      133
      Views

      @domo93 You clearly haven't read the Qt documentation or looked at the examples, because everything you asked for is there. https://doc.qt.io/qt-5/android.html https://doc.qt.io/qtcreator/creator-deploying-android.html
    • UNSOLVED Fresh app development
      General and Desktop • camera pyqt beginner ui design raspberrypi • • Jarenward  

      2
      0
      Votes
      2
      Posts
      271
      Views

      @Jarenward said in Fresh app development: which Qt is for me? There is only one Qt :-) PyQt is a Python binding for Qt and still requires Qt libraries (binaries). So, even if you use PyQt you will need to have Qt libraries which you are using. If I understood you correctly you need your UI on a computer (not Pi), right? This part is simple - just install the latest stable Qt version an start coding :-) For the other part you can either directly develop on Pi (using Raspbian you can easily install Qt with apt) or you have to cross compile Qt to develop on your PC. You don't have to cross compile everything, just what you need. See https://wiki.qt.io/Raspberry_Pi_Beginners_Guide
    • UNSOLVED Preprocessing images from Camera before Viewfinder
      General and Desktop • video camera media • • sergboec  

      7
      0
      Votes
      7
      Posts
      747
      Views

      Ok. I have found a solution QImage imageToReturn = QImage((uchar*)converted_image.data, converted_image.cols, converted_image.rows, QImage::Format_RGB888); imageToReturn.convertToFormat(QImage::Format_RGB32); I have found that when i started to compare metadata between QImage constructed from cv::Mat data and QImage constructed as in second example
    • UNSOLVED Microsoft Surface Camera Resolution and Zoom Options
      QML and Qt Quick • qml camera tablet surface • • larkei15  

      1
      0
      Votes
      1
      Posts
      294
      Views

      No one has replied

    • UNSOLVED CameraRecorder without audio
      QML and Qt Quick • camera gstreamer audio camerabin recording • • YenZi  

      8
      0
      Votes
      8
      Posts
      1376
      Views

      @Cleiton-Bueno thanks for your suggestion. I have disabled audio in my kernel completely now. Now I get the message CameraBin warning: "Could not open audio device for recording." which shows, that I really removed audio support. Unfortunately, this still doesn't solve my basic issue, which is a extremely sluggish video output when the videoRecorder property is enabled in the Camera. That means, the audio encoding was not causing this problem at all. Thx, Jens
    • UNSOLVED QML Camera initialisation in background ?
      QML and Qt Quick • qml camera threading • • YenZi  

      2
      1
      Votes
      2
      Posts
      465
      Views

      Hi @YenZi A little bit late, but could using a Loader and settings its asynchronous property to true work? http://doc.qt.io/qt-5/qml-qtquick-loader.html#asynchronous-prop
    • UNSOLVED Camera Example - changing settings does not work
      General and Desktop • windows camera examples • • michalos  

      4
      0
      Votes
      4
      Posts
      698
      Views

      For example: QCameraImageProcessing
    • UNSOLVED Segmentation Fault trying to display camera feed
      Language Bindings • python camera pyqt segfault • • Xenoshell  

      1
      0
      Votes
      1
      Posts
      459
      Views

      No one has replied

    • SOLVED Streaming camera video data over network [video out]
      General and Desktop • camera video out rtp • • gsharma  

      3
      0
      Votes
      3
      Posts
      1400
      Views

      Hi, To add to @raven-worx, there's also the QtGStreamer project that might be of interest.
    • SOLVED Show camera footage on widget and Send the video out on udp port
      General and Desktop • camera qt 5 udp video out • • gsharma  

      9
      0
      Votes
      9
      Posts
      2757
      Views

      @gsharma Ok, I forgot to mention my test environment, sorry about that. Well, maybe it's a good reason to update your Qt version... Best regards.
    • SOLVED CameraBin error: "Internal data flow error." on tab switching
      General and Desktop • camera tab switching camerabin • • gsharma  

      8
      0
      Votes
      8
      Posts
      2934
      Views

      Solved problem by stopping/starting camera while tab switching.
    • UNSOLVED QCameraInfo
      General and Desktop • dll camera qcamerainfo viewfinder • • mlathrop  

      2
      0
      Votes
      2
      Posts
      764
      Views

      Hi, Are you running them from Qt Creator ? If not did you deploy the QtMultimedia plugins for your second application ?
    • UNSOLVED Inconsistent RBG/BGR format in video frames from Android cameras
      Mobile and Embedded • android qimage camera bgr rgb • • karelc  

      1
      0
      Votes
      1
      Posts
      627
      Views

      No one has replied

    • UNSOLVED Customize QOrbitCameraController setup
      General and Desktop • camera orbit • • lluull  

      3
      0
      Votes
      3
      Posts
      643
      Views

      Hi, Regardless to the linked topic on my post. m.sue was talking about some new implementation commin in qt5.8 for QOrbitCameraController. My question is, so, to know if a new functionalities are done about QOrbitCameraController ? Also, i woukld like to bring my interest to know the road dev for this part (camera manipulation) in qt3d. View manipulation always benefit to be easily customizable, like the tree roof points listed in my post. thx.
    • UNSOLVED UYVY camera Preview
      General and Desktop • camera gstreamer yuv cameraviewfinde uyvy • • RiteshPanchal  

      9
      0
      Votes
      9
      Posts
      3935
      Views

      I have successfully build QT 5.8.0 on nVidia TX1 board. But with QML video surface sink element still getting Reddish preview. https://drive.google.com/open?id=0B8d7zQv-G71oM1JONzlpR2t1OWc I also tried 5.8.0 QT C++ camera example. but for this example camera preview seen for 1-2 sec and then ubuntu hangs. And also the preview appear with wrong color conversion format. So i tried minimal camera example. https://drive.google.com/open?id=0B8d7zQv-G71odXN6ZTkxRTRuOGM But when i start camera following error comes Unable to open the camera "" for read to query the parameter info: "No such file or directory" So how can i preview UYVY camera preview in this example?
    • UNSOLVED Widgets/C++ camera quality vs QtQuick/Qml camera quality
      General and Desktop • qtquick widgets camera multimedia • • Andriy Gerasika  

      2
      0
      Votes
      2
      Posts
      955
      Views

      I think not. It seems to not deeply use the same "gstreamer plugins". I'm also not sure of my answer, but it is the impression i have. You can maybe try to change some camera parameters from qml code, but not sure you will have the same result (it's look like luminosity problem).
    • UNSOLVED QCamera stop working on Android after 4~5 pictures
      QML and Qt Quick • qml android camera • • KroMignon  

      5
      0
      Votes
      5
      Posts
      1527
      Views

      Hi all, I have open a ticket on Qt bug report system => QTBUG-54709 It seems to be an issue with the image preview callback function. Hope this can be fixed for next Qt release :)
    • UNSOLVED QCamera switches not to Active State
      General and Desktop • camera • • Andy314  

      14
      0
      Votes
      14
      Posts
      3508
      Views

      @Drshaw19 No, never solved the problem. I take the standard windows camera now. The communication is a little bit complicated but it works for me.
    • UNSOLVED Camera QML preview problem
      Mobile and Embedded • qml camera qt 5.6 • • Skroopa  

      3
      0
      Votes
      3
      Posts
      1028
      Views

      @mvuori Tried to build *.apk on Qt 5.7.0 RC - the same error. I think, that bug for a long time.
    • UNSOLVED Fix Camera's frame rate and change it resolution
      QML and Qt Quick • qml android camera qt 5.6.0 • • Skroopa  

      1
      0
      Votes
      1
      Posts
      724
      Views

      No one has replied

    • UNSOLVED QML Camera always returns NULL for supportedViewfinderResolutions() on Android
      QML and Qt Quick • qml android camera qt 5.6 • • Skroopa  

      1
      0
      Votes
      1
      Posts
      859
      Views

      No one has replied

    • SOLVED Access IP camera from Qt
      Mobile and Embedded • qml camera ip camera • • mkrr  

      18
      0
      Votes
      18
      Posts
      10416
      Views

      @kolegs Thank you so much. I created this code and the performance was very better. I'm reading two IP cameras now with it. Of course that the delay is existing (each 2 seconds the image is updated). I think that I need to improve my code. I'm using 98% of my CPU, but I need to do many routines :( Thank you so much again
    • SOLVED How does QVideoFilterRunnable manage the OpenGL Context
      Mobile and Embedded • qml android opengl camera • • NFanjat  

      3
      0
      Votes
      3
      Posts
      1027
      Views

      Thank you, I'll do that ASAP
    • UNSOLVED Qt 4.8.6 camera example err :: QContactManager: No such file or directory
      Mobile and Embedded • camera qt 4.8.6 • • Anas_Deshmukh  

      2
      0
      Votes
      2
      Posts
      967
      Views

      QContactManager is part of QtMobility, it is not part of standard Qt. Do you have QtMobility? http://doc-snapshots.qt.io/qt-mobility/qcontactmanager.html
    • UNSOLVED DC1394 machine vision camera
      QML and Qt Quick • qml camera dc1394 • • cbrake  

      4
      0
      Votes
      4
      Posts
      1176
      Views

      The backend allows you to work with both widgets and QML. AFAIK the QQuickImageProvider is used the other way around, you ask images to it. Don't be afraid of the task, a QtMultimedia backend is really not that hard to implement.
    • UNSOLVED display a camera in Qt Quick
      QML and Qt Quick • camera cameraviewfinde qt quick multim • • nils90  

      3
      0
      Votes
      3
      Posts
      894
      Views

      Here is a complete workshop explaining how to handle the Camera with QtQuick - in addition the demo project in github shows how to read QRCodes with QZXing : https://forum.qt.io/topic/63838/qt-qml-workshop-materials/3
    • SOLVED Checking for selecting
      General and Desktop • camera qaction • • Suji  

      10
      0
      Votes
      10
      Posts
      2929
      Views

      Hi @SGaist ! I moved the 2 lines : QCameraViewfinder *viewfinder = new QCameraViewfinder(this); setCentralWidget(viewfinder); from my principale function to the MaFenetre::onActionSelected function, and that work ! Thanks a lot guys, you're magic here ! I was searching for days !
    • UNSOLVED Getting raw H.264 and AAC data from QML Camera
      QML and Qt Quick • camera h264 c++ and qml cod • • Skroopa  

      6
      0
      Votes
      6
      Posts
      4445
      Views

      @SGaist Thanks for you reply. The only way to create what I need - using Android functions directly and I must forgot about crossplatform for my app (if you want to use, for example, hardware acceleration or something). The code bellow is the main class (java, for use with QAndroidJniObject), that draws camera preview, using hardware: import org.qtproject.qt5.android.bindings.QtApplication; import org.qtproject.qt5.android.bindings.QtActivity; import android.hardware.Camera; import android.media.MediaCodec; import android.media.MediaCodecInfo; import android.media.MediaFormat; import android.media.MediaMuxer; import android.app.Notification; import android.app.NotificationManager; import android.content.Context; import android.graphics.SurfaceTexture; import android.view.TextureView.SurfaceTextureListener; import android.view.TextureView; import android.view.Gravity; import android.widget.FrameLayout; import android.os.Bundle; import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; public class CameraAndroid extends QtActivity implements SurfaceTextureListener { private static NotificationManager notificationManager; private static Notification.Builder notificationBuilder; private static CameraAndroid cameraAndroid; public CameraAndroid() { cameraAndroid = this; } private static MediaCodec mediaCodec; private static TextureView textureView; private static Camera camera; static int encWidth = 640, encHeight = 480; public static int start() { // Camera not started yet if(camera == null) { Camera.CameraInfo info = new Camera.CameraInfo(); // Set front facing camera by default int numCameras = Camera.getNumberOfCameras(); for (int i = 0; i < numCameras; i++) { Camera.getCameraInfo(i, info); if (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) { camera = Camera.open(i); break; } } if (camera == null) { camera = Camera.open(); } if (camera == null) return 9001; Camera.Parameters params = camera.getParameters(); Camera.Size cameraSize = params.getPreferredPreviewSizeForVideo(); for (Camera.Size size : params.getSupportedPreviewSizes()) { if (size.width == encWidth && size.height == encHeight) { params.setPreviewSize(encWidth, encHeight); break; } } // New camera preview size if (cameraSize != null) { params.setPreviewSize(cameraSize.width, cameraSize.height); } camera.setParameters(params); textureView.setLayoutParams(new FrameLayout.LayoutParams(camera.getParameters().getPreviewSize().width, camera.getParameters().getPreviewSize().height, Gravity.CENTER)); } return 0; } public static int stop() { if (camera != null) { camera.stopPreview(); camera.release(); camera = null; } return 0; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); textureView = new TextureView(this); textureView.setSurfaceTextureListener(this); setContentView(textureView); // <------------------------- Draws on all entire screen :(((( } @Override public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) { try { if(start() == 0) { camera.setPreviewTexture(surface); camera.startPreview(); } } catch (IOException ioe) { return 9002; } } @Override public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) { } @Override public void onSurfaceTextureUpdated(SurfaceTexture surface) {} @Override public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) { stop(); return true; } } But now, I can't see QML elements of my app! :(( Is it possible to draw QML elements over/above TextureView, change draw order or something? What I must to do? Many thanks!
    • UNSOLVED QML Camera running in Android dies
      QML and Qt Quick • qml android camera qt programming • • guidupas  

      1
      0
      Votes
      1
      Posts
      795
      Views

      No one has replied

    • UNSOLVED QCamera/QtCamera GStreamer V4L problem
      General and Desktop • camera multimedia raspberry pi 2 gstreamer1.0 • • devel  

      1
      0
      Votes
      1
      Posts
      3878
      Views

      No one has replied

    • How can i get an streaming video from an IP Camera or DVR ?
      General and Desktop • camera streaming rtsp ip-camera dvr • • alirezatkh2  

      10
      0
      Votes
      10
      Posts
      6309
      Views

      Is anybody here who have worked with libVLC without any problem? is it a convenience library or a lib with a lot of problem? please help me?
    • How to interface usb camera with Camera example in Qt..
      General and Desktop • camera • • Rahul_tiwari  

      1
      0
      Votes
      1
      Posts
      801
      Views

      No one has replied

    • QML Camera change resolution on Windows
      QML and Qt Quick • camera resolution • • ratwix  

      1
      0
      Votes
      1
      Posts
      1147
      Views

      No one has replied

    • Camera not working
      General and Desktop • camera • • Andy314  

      5
      0
      Votes
      5
      Posts
      2128
      Views

      @Franckynos Yes, I know video capture is not supported for windows. But, I fail already, by the simple camera initialisation. :-( An idears: driver - codecs missing, user right for camera, what can I do to find out what does not work .... If I can not solve the problem my whole project will break down.
    • qcameraviewfinder rotation
      General and Desktop • camera • • Andy314  

      2
      0
      Votes
      2
      Posts
      923
      Views

      You might post your code or give us a bit more details...you might have your application defined to rotate screen automatically following the actual device orientation. Otherwise another simple option is to use the orientation sensor to manage the viewfinder orientation : OrientationSensor{ id:orient active:true property int rotAngle :90 property bool isPortrait : true onReadingChanged: { if (reading.orientation === OrientationReading.LeftUp) { rotAngle = -90; isPortrait = false; } else if (reading.orientation === OrientationReading.RightUp) { rotAngle = 90; isPortrait = false; } else if (reading.orientation === OrientationReading.TopDown) { isPortrait = true; rotAngle = 180; } else { isPortrait = true; rotAngle = 0; } } }
    • How to use QAbstractVideoFilter to process frames from camera
      QML and Qt Quick • camera filter frame qabstractvideof • • DennisZhang  

      27
      0
      Votes
      27
      Posts
      13917
      Views

      Please let me know if there is any update on this. Mike
    • Modify live camera stream and send to external entity without using GUI.
      Mobile and Embedded • qt5.5 raspberry pi camera streaming • • Soppe  

      9
      0
      Votes
      9
      Posts
      3800
      Views

      So is there any magic involved in getting a decent fps? I am aware that this is more related to QtGstreamer and RPi2 forums, but I've got nothing to lose trying here too as i assume others have been here before me. The code I've used just to verify that it works is from https://github.com/shadeslayer/qtgstreamer/tree/master/examples/qmlplayer. I removed the OpenGL part as it slowed the fps down to 1-2, and i removed the buttons to make it simpler. A tl;dr of the code is: QtGstreamer 0.10 Gstreamer 0.10 QGst::Ui::GraphicsVideoSurface QML linked to surface via sink playbin2 pipeline stream directly from RPi camera on /dev/video0 Ive been having a hard time finding out what kind of element name would work when generating a pipeline, especially since I'm using Gstreamer 0.10, so I'm thinking the cause of the low FPS may be related a mix of the element name, the pipeline properties, and the (Qt)GStreamer version? Also, does QtGstreamer 0.10 support black/white colors?