id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
picamera_basic_advanced_recipes/imshowpythonmacosnot_33_0.txt
[ edit ](/questions/207755/edit/) [ retag ](/s/questions/207755/retag/) flag offensive [ close ](/questions/207755/close/) merge delete
picamera_basic_advanced_recipes/18461_94_0.txt
###
picamera_basic_advanced_recipes/18461_280_0.txt
**[ scipioni ](/scipioni) ** commented Jul 7, 2022
picamera_basic_advanced_recipes/18461_305_0.txt
[ ![@shaojunjie0912](https://avatars.githubusercontent.com/u/96936298?s=80&u=6ea8345075c33997e25172f362d5e806608b0a41&v=4) ](/shaojunjie0912)
picamera_basic_advanced_recipes/18461_281_0.txt
this mapping **-v /tmp/.X11-unix:/tmp/.X11-unix** solved for me
picamera_basic_advanced_recipes/picamera_basic_recipes_7_0.txt
## 3.7. Capturing in low light ¶ Using similar tricks to those in Capturing consistent images , the Pi’s camera can capture images in low light conditions. The primary objective is to set a high gain, and a long exposure time to allow the camera to gather as much light as possible. However, the [ ` shutter_speed ...
picamera_basic_advanced_recipes/picamera_basic_recipes_5_0.txt
## 3.5. Capturing consistent images ¶ You may wish to capture a sequence of images all of which look the same in terms of brightness, color, and contrast (this can be useful in timelapse photography, for example). Various attributes need to be used in order to ensure consistency across multiple shots. Specifically, ...
picamera_basic_advanced_recipes/18461_142_0.txt
Copy link
picamera_basic_advanced_recipes/18461_303_0.txt
[ "Can't initialize GTK backend in function 'cvInitSystem'" Xilinx/Vitis- AI#1107 ](/Xilinx/Vitis-AI/issues/1107)
picamera_basic_advanced_recipes/imshowpythonmacosnot_72_0.txt
[ __ GitHub ](https://github.com/opencv)
picamera_basic_advanced_recipes/picamera_advanced_recipes_4_0.txt
## 4.4. Unencoded image capture (RGB format) ¶ The RGB format is rather larger than the [ YUV ](https://en.wikipedia.org/wiki/YUV) format discussed in the section above, but is more useful for most analyses. To have the camera produce output in [ RGB ](https://en.wikipedia.org/wiki/RGB) format, you simply need to sp...
picamera_basic_advanced_recipes/243406_33_0.txt
[ Houber ](https://forums.developer.nvidia.com/u/Houber) February 20, 2023, 6:13am 14
picamera_basic_advanced_recipes/18461_11_0.txt
* [ Enterprise ](https://github.com/enterprise) * [ Teams ](https://github.com/team) * [ Startups ](https://github.com/enterprise/startups) * [ Education ](https://education.github.com)
picamera_basic_advanced_recipes/18461_258_0.txt
###
picamera_basic_advanced_recipes/18461_109_0.txt
Copy link
picamera_basic_advanced_recipes/18461_148_0.txt
Sorry, something went wrong.
picamera_basic_advanced_recipes/imshowpythonmacosnot_74_0.txt
[ __ Documentation ](https://docs.opencv.org)
picamera_basic_advanced_recipes/18461_276_0.txt
Sorry, something went wrong.
picamera_basic_advanced_recipes/18461_263_0.txt
2- at docker run command add the following: ` docker run --"all your other tags" -e DISPLAY=$DISPLAY -v /tmp/.X11-unix: /tmp/.X11-unix "image id" `
picamera_basic_advanced_recipes/18461_26_0.txt
[ Search syntax tips ](https://docs.github.com/search-github/github-code- search/understanding-github-code-search-syntax)
picamera_basic_advanced_recipes/18461_117_0.txt
Copy link
picamera_basic_advanced_recipes/18461_362_0.txt
You succeed to slove this problem to WSL?
picamera_basic_advanced_recipes/243406_21_0.txt
[ ![2023-02-16 17-12-33屏幕截图](https://global.discourse- cdn.com/nvidia/optimized/3X/a/2/a265f084e2da6f78d8da344dfab218d923b0575a_2_690x430.png) 2023-02-16 17-12-33屏幕截图 733×457 86.6 KB ](https://global.discourse- cdn.com/nvidia/original/3X/a/2/a265f084e2da6f78d8da344dfab218d923b0575a.png "2023-02-16 17-12-33屏幕截图")
picamera_basic_advanced_recipes/picamera_basic_recipes_8_1.txt
connection.close() client_socket.close() The server script should be run first to ensure there’s a listening socket ready to accept a connection from the client script.
picamera_basic_advanced_recipes/18461_330_0.txt
Sorry, something went wrong.
picamera_basic_advanced_recipes/18461_65_0.txt
##### System information (version)
picamera_basic_advanced_recipes/18461_341_0.txt
[ ![@anvinder](https://avatars.githubusercontent.com/u/22649426?s=80&v=4) ](/anvinder)
picamera_basic_advanced_recipes/243406_4_0.txt
[ Houber ](https://forums.developer.nvidia.com/u/Houber) February 20, 2023, 1:44am 1
picamera_basic_advanced_recipes/sshx11forwardingprob_15_0.txt
Information:
picamera_basic_advanced_recipes/18461_274_0.txt
---
picamera_basic_advanced_recipes/picamera_basic_recipes_11_0.txt
## 3.11. Recording over multiple files ¶ If you wish split your recording over multiple files, you can use the [ ` split_recording() ` ](api_camera.html#picamera.PiCamera.split_recording "picamera.PiCamera.split_recording") method to accomplish this: import picamera camera = picamera.PiCamer...
picamera_basic_advanced_recipes/18461_69_0.txt
ExternalProject_Add(opencv GIT_REPOSITORY https://github.com/opencv/opencv GIT_TAG "3.4" SOURCE_DIR opencv BINARY_DIR opencv-build CMAKE_ARGS -DCMAKE_BUILD_TYPE=RELEASE -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_V4L=ON -DWITH_QT=OFF -DWITH_GTK_2_x=ON -DWITH_OPENGL=ON -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/opencv_install )...
picamera_basic_advanced_recipes/18461_350_0.txt
Copy link
picamera_basic_advanced_recipes/18461_124_0.txt
We don't help with remote investigation of problems which we are not able to reproduce on our side (because it is very time consuming and usually configuration problem without any following fix into OpenCV), but we can take a look on **the clear reason of the problem** and suggest some fix/workaround.
picamera_basic_advanced_recipes/18461_309_0.txt
> it works!
picamera_basic_advanced_recipes/picamera_basic_recipes_3_0.txt
## 3.3. Capturing to a PIL Image ¶ This is a variation on Capturing to a stream . First we’ll capture an image to a [ ` BytesIO ` ](https://docs.python.org/3.4/library/io.html#io.BytesIO "\(in Python v3.4\)") stream (Python’s in-memory stream class), then we’ll rewind the position of the stream to the start, and ...
picamera_basic_advanced_recipes/imshowpythonmacosnot_100_0.txt
*[ 2019-01-23 17:22:41 -0600 ]: 2019-01-23 17:22:41 -0600 *[ 2019-01-24 07:21:53 -0600 ]: 2019-01-24 07:21:53 -0600 *[ 2019-01-24 01:55:37 -0600 ]: 2019-01-24 01:55:37 -0600 *[ 2019-01-24 06:23:34 -0600 ]: 2019-01-24 06:23:34 -0600 *[ 2019-01-24 06:50:40 -0600 ]: 2019-01-24 06:50:40 -0600 *[ 2019-01-24 06:56:32 -0600 ]...
picamera_basic_advanced_recipes/18461_306_0.txt
Copy link
picamera_basic_advanced_recipes/18461_308_0.txt
**[ shaojunjie0912 ](/shaojunjie0912) ** commented Feb 8, 2023
picamera_basic_advanced_recipes/imshowpythonmacosnot_25_0.txt
Any ideas what I might be doing wrong?
picamera_basic_advanced_recipes/243406_0_0.txt
[ NVIDIA Developer Forums ](/)
picamera_basic_advanced_recipes/imshowpythonmacosnot_81_0.txt
Seen: **13,560 times**
picamera_basic_advanced_recipes/243406_12_0.txt
i really need some help urgently, please!
picamera_basic_advanced_recipes/sshx11forwardingprob_25_0.txt
Original Poster Rep: Reputation: Disabled Problem is not related with DISPLAY variable. The problem is related with compositor. In our system, wayland based compositor is used by default. I get opencv with apt-get install. This opencv libraries don't support wayland based compositor. This is our problem. Thanks for you...
picamera_basic_advanced_recipes/18461_301_0.txt
Sorry, something went wrong.
picamera_basic_advanced_recipes/18461_176_0.txt
this method is effective
picamera_basic_advanced_recipes/imshowpythonmacosnot_11_0.txt
* [ python3 ](/questions/scope:all/sort:activity-desc/tags:python3/page:1/)
picamera_basic_advanced_recipes/18461_345_0.txt
I still have the problem. I am not doing ssh or using vnc. It's a rpi4 and the cv2.imshow function works fine if i run the script myself but when i do it via crontab or rc.local during boot then i see the error "can't initialize gtk backend in function 'cvinitsystem'"
picamera_basic_advanced_recipes/18461_349_0.txt
[ ![@Nandu3219](https://avatars.githubusercontent.com/u/126450594?s=80&u=adc426128dd7d0eb7f55f2bad1ad7212cd8be590&v=4) ](/Nandu3219)
picamera_basic_advanced_recipes/picamera_basic_recipes_14_0.txt
## 3.14. Overlaying images on the preview ¶ The camera preview system can operate multiple layered renderers simultaneously. While the picamera library only permits a single renderer to be connected to the camera’s preview port, it does permit additional renderers to be created which display a static image. These ov...
picamera_basic_advanced_recipes/18461_88_0.txt
---
picamera_basic_advanced_recipes/imshowpythonmacosnot_46_0.txt
there is a close issue [ here ](https://github.com/opencv/opencv/issues/8885) . is it same problem
picamera_basic_advanced_recipes/imshowpythonmacosnot_15_0.txt
[ AnnaMP ](/users/414443/annamp/) 36 ● 1 ● 4
picamera_basic_advanced_recipes/18461_202_0.txt
Sorry, something went wrong.
picamera_basic_advanced_recipes/18461_154_0.txt
---
picamera_basic_advanced_recipes/243406_9_0.txt
i put it on the tx2 forum originally, but
picamera_basic_advanced_recipes/picamera_basic_recipes_1_0.txt
## 3.1. Capturing to a file ¶ Capturing an image to a file is as simple as specifying the name of the file as the output of whatever [ ` capture() ` ](api_camera.html#picamera.PiCamera.capture "picamera.PiCamera.capture") method you require: from time import sleep from picamera import PiCamera ...
picamera_basic_advanced_recipes/imshowpythonmacosnot_80_0.txt
Asked: ** 2019-01-23 17:22:41 -0600 **
picamera_basic_advanced_recipes/imshowpythonmacosnot_21_0.txt
cv2.imshow('Butterfly', img) cv2.waitKey(0) cv2.destroyAllWindows()
picamera_basic_advanced_recipes/18461_255_0.txt
Sorry, something went wrong.
picamera_basic_advanced_recipes/imshowpythonmacosnot_95_0.txt
[ about ](/about/) | [ faq ](/faq/) | [ help ](/help/ "help") | [ privacy policy ](/privacy/) | [ terms of service ](/terms/)
picamera_basic_advanced_recipes/18461_292_0.txt
All reactions
picamera_basic_advanced_recipes/sshx11forwardingprob_9_0.txt
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
picamera_basic_advanced_recipes/18461_42_0.txt
* * [ Notifications ](/login?return_to=%2Fopencv%2Fopencv) * [ Fork 55.6k ](/login?return_to=%2Fopencv%2Fopencv) * [ Star 75.7k ](/login?return_to=%2Fopencv%2Fopencv)
picamera_basic_advanced_recipes/18461_47_0.txt
**Have a question about this project?** Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
picamera_basic_advanced_recipes/18461_217_0.txt
**[ erdemozc ](/erdemozc) ** commented Jun 25, 2021
picamera_basic_advanced_recipes/imshowpythonmacosnot_62_0.txt
Sort by » [ oldest ](/question/207755/imshow-pythonmacos-not-showing-the- image/?sort=oldest#sort-top) [ newest ](/question/207755/imshow-pythonmacos- not-showing-the-image/?sort=latest#sort-top) [ most voted ](/question/207755/imshow-pythonmacos-not-showing-the-image/?sort=votes#sort- top)
picamera_basic_advanced_recipes/picamera_advanced_recipes_10_1.txt
h picamera.PiCamera(resolution='640x480', framerate=24) as camera: output = StreamingOutput() camera.start_recording(output, format='mjpeg') try: address = ('', 8000) server = StreamingServer(address, StreamingHandler) server.serve_forever() finally: ...
picamera_basic_advanced_recipes/18461_376_0.txt
No branches or pull requests
picamera_basic_advanced_recipes/18461_46_0.txt
New issue
picamera_basic_advanced_recipes/imshowpythonmacosnot_96_0.txt
[ Powered by Askbot version 0.10.2 ](http://askbot.com)
picamera_basic_advanced_recipes/18461_243_0.txt
All reactions
picamera_basic_advanced_recipes/18461_335_0.txt
If you use SSH to connect you divice or your progress is a server ,and nowhere to display any image.So please remove the code related windows or display.for example imshow()
picamera_basic_advanced_recipes/18461_102_0.txt
###
picamera_basic_advanced_recipes/picamera_advanced_recipes_17_2.txt
[ Builds ](//readthedocs.org/builds/picamera/?fromdocs=picamera) * * * Free document hosting provided by [ Read the Docs ](http://www.readthedocs.org) .
picamera_basic_advanced_recipes/18461_223_0.txt
[ what are the minimum dependancies for zed image capture?[Question] stereolabs/zed-sdk#424 ](/stereolabs/zed-sdk/issues/424)
picamera_basic_advanced_recipes/18461_190_0.txt
All reactions
picamera_basic_advanced_recipes/243406_28_0.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c588b9..fa233db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,5 +37,5 @@ target_link_libraries(${PROJECT_NAME} vpi opencv_core opencv_imgproc) if(OpenCV_VERSION VERSION_LESS 3) target_link_libraries(${PROJECT_NAME} opencv_highgui) else() - target_link_lib...
picamera_basic_advanced_recipes/picamera_advanced_recipes_15_1.txt
.parent.i_frames = 0 self.parent.p_frames = 0 super(MyEncoder, self).start(output, motion_output) def _callback_write(self, buf): # Only count when buffer indicates it's the end of a frame, and # it's not an SPS/PPS header (..._CONFIG) if ( ...
picamera_basic_advanced_recipes/18461_298_0.txt
thank u, your answer solved my problem
picamera_basic_advanced_recipes/sshx11forwardingprob_30_0.txt
import cv2 from PIL import Image UPSers.com
picamera_basic_advanced_recipes/18461_130_0.txt
Closed
picamera_basic_advanced_recipes/18461_108_0.txt
[ ![@IstiakFahim28](https://avatars.githubusercontent.com/u/54916519?s=80&u=39f93d2a63bad4a26d036d32d510f545ec893239&v=4) ](/IstiakFahim28)
picamera_basic_advanced_recipes/18461_319_0.txt
I had to comment imshow() and also corresponding namedWindow() created for imshow(). Then my issue is resolved. I faced same problem with OpenCV 4.7
picamera_basic_advanced_recipes/18461_357_0.txt
[ ![@arielkantorovich](https://avatars.githubusercontent.com/u/56262208?s=80&v=4) ](/arielkantorovich)
picamera_basic_advanced_recipes/imshowpythonmacosnot_18_0.txt
I know that the image is loaded correctly, because I'm printing out the arrays and image data looks right. Also I can see that the window always has the correct _measurements_ for whichever image file I'm picking.
picamera_basic_advanced_recipes/18461_364_0.txt
All reactions
picamera_basic_advanced_recipes/18461_89_0.txt
All reactions
picamera_basic_advanced_recipes/imshowpythonmacosnot_52_0.txt
can you use opencv-python 3.3
picamera_basic_advanced_recipes/18461_314_0.txt
Copy link
picamera_basic_advanced_recipes/18461_36_0.txt
Cancel Create saved search
picamera_basic_advanced_recipes/imshowpythonmacosnot_88_0.txt
[ jpg does not show ](/question/11057/jpg-does-not-show/)
picamera_basic_advanced_recipes/sshx11forwardingprob_22_0.txt
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856 I think you need to set the DISPLAY variable to your host ip not localhost which will be the ip of the board
picamera_basic_advanced_recipes/18461_272_0.txt
> To help others, I found that my .bashrc needed to contain the following: ` > export DISPLAY=:0.0 ` previously, it said ` export DISPLAY=localhost:0.0 `
picamera_basic_advanced_recipes/imshowpythonmacosnot_10_0.txt
* [ OSX ](/questions/scope:all/sort:activity-desc/tags:OSX/page:1/)
picamera_basic_advanced_recipes/18461_318_0.txt
> I managed to solve it by making sure when I ssh into aarch64 that I use ssh > -Y user@host. This gives authorization to allow cv2.imshow() to display the > window. [ gtk_init_check error solved > ](https://unix.stackexchange.com/questions/94497/org-eclipse-swt-swterror- > no-more-handles-gtk-init-check-failed-while-r...
picamera_basic_advanced_recipes/picamera_advanced_recipes_0_0.txt
[ Picamera ](index.html) release-1.13 * [ 1\. Installation ](install.html) * [ 2\. Getting Started ](quickstart.html) * [ 3\. Basic Recipes ](recipes1.html) * 4\. Advanced Recipes * 4.1. Capturing to a numpy array * 4.2. Capturing to an OpenCV object * 4.3. Unencoded image capture (YUV format) ...
picamera_basic_advanced_recipes/18461_56_0.txt
# error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem' #18461
picamera_basic_advanced_recipes/18461_283_0.txt
All reactions
picamera_basic_advanced_recipes/18461_122_0.txt
* * *