cv2.imshow() function throws an assertion error The 2019 Stack Overflow Developer Survey Results Are Incv2.error: OpenCV(4.0.0) error: (-215:Assertion failed) dst.data == (uchar*)dst_ptr in function 'cvShowImage'OpenNI and OpenCV: cv2.imshow() crashes with error: (-215:Assertion failed) dst.data == (uchar*)dst_ptr in function 'cvShowImage'How to flush output of print function?Build Error For cv2.imshow()Python cv2 cv2.imshow() not working in windowsHow to solve cv2.error: (-215)?Python-OpenCV cv2 OpenCV Error: Assertion failedResizing video resolution in OpenCV pythonOpen CV error in motion detectionOpenCV “cv2.omnidir.calibrate” throws an Assertion ErrorWhy does my color detection code cause an OpenCV error?tkinter.root.destroy and cv2.imshow - X Windows system error
Why didn't the Event Horizon Telescope team mention Sagittarius A*?
Falsification in Math vs Science
Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?
Will it cause any balance problems to have PCs level up and gain the benefits of a long rest mid-fight?
Accepted by European university, rejected by all American ones I applied to? Possible reasons?
How can I add encounters in the Lost Mine of Phandelver campaign without giving PCs too much XP?
Star Trek - X-shaped Item on Regula/Orbital Office Starbases
Can I have a signal generator on while it's not connected?
Why couldn't they take pictures of a closer black hole?
What does もの mean in this sentence?
Why was M87 targeted for the Event Horizon Telescope instead of Sagittarius A*?
Is it correct to say the Neural Networks are an alternative way of performing Maximum Likelihood Estimation? if not, why?
How to notate time signature switching consistently every measure
Is it safe to harvest rainwater that fell on solar panels?
For what reasons would an animal species NOT cross a *horizontal* land bridge?
Why “相同意思的词” is called “同义词” instead of "同意词"?
What is the meaning of Triage in Cybersec world?
Inverse Relationship Between Precision and Recall
Slides for 30 min~1 hr Skype tenure track application interview
Geography at the pixel level
Can you cast a spell on someone in the Ethereal Plane, if you are on the Material Plane and have the True Seeing spell active?
Why are there uneven bright areas in this photo of black hole?
What does Linus Torvalds mean when he says that Git "never ever" tracks a file?
What is the most efficient way to store a numeric range?
cv2.imshow() function throws an assertion error
The 2019 Stack Overflow Developer Survey Results Are Incv2.error: OpenCV(4.0.0) error: (-215:Assertion failed) dst.data == (uchar*)dst_ptr in function 'cvShowImage'OpenNI and OpenCV: cv2.imshow() crashes with error: (-215:Assertion failed) dst.data == (uchar*)dst_ptr in function 'cvShowImage'How to flush output of print function?Build Error For cv2.imshow()Python cv2 cv2.imshow() not working in windowsHow to solve cv2.error: (-215)?Python-OpenCV cv2 OpenCV Error: Assertion failedResizing video resolution in OpenCV pythonOpen CV error in motion detectionOpenCV “cv2.omnidir.calibrate” throws an Assertion ErrorWhy does my color detection code cause an OpenCV error?tkinter.root.destroy and cv2.imshow - X Windows system error
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
The above error still persists even after upgrading my opencv library and also uninstalling and reinstalling several times.
Any other tips to fix this error?
This my source code, the cv2.imshow() function started giving me the error.
cap = cv2.VideoCapture(0)
while True:
_, frame = cap.read()
sobelx = cv2.Sobel(frame, cv2.CV_64F, 1, 0, ksize=5)
sobely = cv2.Sobel(frame, cv2.CV_64F, 0, 1, ksize=5)
cv2.imshow('frame', frame)
cv2.imshow('sobelx', sobelx)
cv2.imshow('sobely', sobely)
if cv2.waitKey(5) & 0xFF == 27:
break
cv2.destroyAllWindows()
cap.release()
The Error Message I recieve:
cv2.imshow('sobelx', sobelx)
cv2.error: OpenCV(4.0.0) C:projects
opencv-pythonopencvmoduleshighguisrcwindow_w32.cpp:1230:
error: (-215:Assertion failed) dst.data == (uchar*)dst_ptr in function 'cvShowImage'
On the other hand the cv2.imshow() function works properly for the below code. Please note: The code below does not apply any filters like laplacian or sobel to the video feed.
cap = cv2.VideoCapture(0)
while True:
_, frame = cap.read()
cv2.imshow('frame', frame)
if cv2.waitKey(5) & 0xFF == 27:
break
cv2.destroyAllWindows()
cap.release()
python-3.x opencv4
add a comment |
The above error still persists even after upgrading my opencv library and also uninstalling and reinstalling several times.
Any other tips to fix this error?
This my source code, the cv2.imshow() function started giving me the error.
cap = cv2.VideoCapture(0)
while True:
_, frame = cap.read()
sobelx = cv2.Sobel(frame, cv2.CV_64F, 1, 0, ksize=5)
sobely = cv2.Sobel(frame, cv2.CV_64F, 0, 1, ksize=5)
cv2.imshow('frame', frame)
cv2.imshow('sobelx', sobelx)
cv2.imshow('sobely', sobely)
if cv2.waitKey(5) & 0xFF == 27:
break
cv2.destroyAllWindows()
cap.release()
The Error Message I recieve:
cv2.imshow('sobelx', sobelx)
cv2.error: OpenCV(4.0.0) C:projects
opencv-pythonopencvmoduleshighguisrcwindow_w32.cpp:1230:
error: (-215:Assertion failed) dst.data == (uchar*)dst_ptr in function 'cvShowImage'
On the other hand the cv2.imshow() function works properly for the below code. Please note: The code below does not apply any filters like laplacian or sobel to the video feed.
cap = cv2.VideoCapture(0)
while True:
_, frame = cap.read()
cv2.imshow('frame', frame)
if cv2.waitKey(5) & 0xFF == 27:
break
cv2.destroyAllWindows()
cap.release()
python-3.x opencv4
Have you reviewed these other posts: stackoverflow.com/q/54336237/9987623, stackoverflow.com/q/54370220/9987623
– AlexK
Mar 22 at 5:15
add a comment |
The above error still persists even after upgrading my opencv library and also uninstalling and reinstalling several times.
Any other tips to fix this error?
This my source code, the cv2.imshow() function started giving me the error.
cap = cv2.VideoCapture(0)
while True:
_, frame = cap.read()
sobelx = cv2.Sobel(frame, cv2.CV_64F, 1, 0, ksize=5)
sobely = cv2.Sobel(frame, cv2.CV_64F, 0, 1, ksize=5)
cv2.imshow('frame', frame)
cv2.imshow('sobelx', sobelx)
cv2.imshow('sobely', sobely)
if cv2.waitKey(5) & 0xFF == 27:
break
cv2.destroyAllWindows()
cap.release()
The Error Message I recieve:
cv2.imshow('sobelx', sobelx)
cv2.error: OpenCV(4.0.0) C:projects
opencv-pythonopencvmoduleshighguisrcwindow_w32.cpp:1230:
error: (-215:Assertion failed) dst.data == (uchar*)dst_ptr in function 'cvShowImage'
On the other hand the cv2.imshow() function works properly for the below code. Please note: The code below does not apply any filters like laplacian or sobel to the video feed.
cap = cv2.VideoCapture(0)
while True:
_, frame = cap.read()
cv2.imshow('frame', frame)
if cv2.waitKey(5) & 0xFF == 27:
break
cv2.destroyAllWindows()
cap.release()
python-3.x opencv4
The above error still persists even after upgrading my opencv library and also uninstalling and reinstalling several times.
Any other tips to fix this error?
This my source code, the cv2.imshow() function started giving me the error.
cap = cv2.VideoCapture(0)
while True:
_, frame = cap.read()
sobelx = cv2.Sobel(frame, cv2.CV_64F, 1, 0, ksize=5)
sobely = cv2.Sobel(frame, cv2.CV_64F, 0, 1, ksize=5)
cv2.imshow('frame', frame)
cv2.imshow('sobelx', sobelx)
cv2.imshow('sobely', sobely)
if cv2.waitKey(5) & 0xFF == 27:
break
cv2.destroyAllWindows()
cap.release()
The Error Message I recieve:
cv2.imshow('sobelx', sobelx)
cv2.error: OpenCV(4.0.0) C:projects
opencv-pythonopencvmoduleshighguisrcwindow_w32.cpp:1230:
error: (-215:Assertion failed) dst.data == (uchar*)dst_ptr in function 'cvShowImage'
On the other hand the cv2.imshow() function works properly for the below code. Please note: The code below does not apply any filters like laplacian or sobel to the video feed.
cap = cv2.VideoCapture(0)
while True:
_, frame = cap.read()
cv2.imshow('frame', frame)
if cv2.waitKey(5) & 0xFF == 27:
break
cv2.destroyAllWindows()
cap.release()
python-3.x opencv4
python-3.x opencv4
asked Mar 22 at 4:39
Carlton RodriguesCarlton Rodrigues
1
1
Have you reviewed these other posts: stackoverflow.com/q/54336237/9987623, stackoverflow.com/q/54370220/9987623
– AlexK
Mar 22 at 5:15
add a comment |
Have you reviewed these other posts: stackoverflow.com/q/54336237/9987623, stackoverflow.com/q/54370220/9987623
– AlexK
Mar 22 at 5:15
Have you reviewed these other posts: stackoverflow.com/q/54336237/9987623, stackoverflow.com/q/54370220/9987623
– AlexK
Mar 22 at 5:15
Have you reviewed these other posts: stackoverflow.com/q/54336237/9987623, stackoverflow.com/q/54370220/9987623
– AlexK
Mar 22 at 5:15
add a comment |
1 Answer
1
active
oldest
votes
In this Github issue discussion, it was mentioned that this bug was fixed in OpenCV 4.0.1. Based on the error you received, it looks like you have 4.0.0, so another upgrade may be needed.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55293015%2fcv2-imshow-function-throws-an-assertion-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
In this Github issue discussion, it was mentioned that this bug was fixed in OpenCV 4.0.1. Based on the error you received, it looks like you have 4.0.0, so another upgrade may be needed.
add a comment |
In this Github issue discussion, it was mentioned that this bug was fixed in OpenCV 4.0.1. Based on the error you received, it looks like you have 4.0.0, so another upgrade may be needed.
add a comment |
In this Github issue discussion, it was mentioned that this bug was fixed in OpenCV 4.0.1. Based on the error you received, it looks like you have 4.0.0, so another upgrade may be needed.
In this Github issue discussion, it was mentioned that this bug was fixed in OpenCV 4.0.1. Based on the error you received, it looks like you have 4.0.0, so another upgrade may be needed.
answered Mar 22 at 5:07
AlexKAlexK
441111
441111
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55293015%2fcv2-imshow-function-throws-an-assertion-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you reviewed these other posts: stackoverflow.com/q/54336237/9987623, stackoverflow.com/q/54370220/9987623
– AlexK
Mar 22 at 5:15