Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Assertion error in CamGear API during colorspace manipulation #78

Closed
5 tasks done
abhiTronix opened this issue Dec 12, 2019 · 1 comment
Closed
5 tasks done
Assignees
Labels
BUG 🐛 Vidgear api's error, flaw or fault SOLVED 🏁 This issue/PR is resolved now. Goal Achieved!
Milestone

Comments

@abhiTronix
Copy link
Owner

Description

This bug directly affects colorspace manipulation in CamGear API. Due to this bug, the CamGear API currently exits itself with (-215:Assertion failed) !_src.empty() in function 'cvtColor' error with any colorspace because of the improper handling of threaded queue structure.

Acknowledgment

  • A brief but descriptive Title of your issue
  • I have searched the issues for my issue and found nothing related or helpful.
  • I have read the FAQ.
  • I have read the Wiki.
  • I have read the Contributing Guidelines.

Environment

  • VidGear version: 0.1.6-dev
  • Branch: Development
  • Python version: All
  • pip version: All
  • Operating System and version: All

Expected Behavior

No Assertion error while self-terminating.

Actual Behavior

Throws (-215:Assertion failed) !_src.empty() in function 'cvtColor' error on self-termination.

Code to reproduce

from vidgear.gears import CamGear
stream = CamGear(source=test.mp4, colorspace = 'COLOR_BGR2YUV', logging=True).start()
while True:
	frame = stream.read()
	# check if frame is None
	if frame is None:
		#if True break the infinite loop
		break
stream.stop()

On executing this function, It will self-terminate with (-215:Assertion failed) !_src.empty() in function 'cvtColor' error.

@abhiTronix abhiTronix added BUG 🐛 Vidgear api's error, flaw or fault BUG CONFIRMED ✅ Bug is confirmed! WORK IN PROGRESS 🚧 currently been worked on. labels Dec 12, 2019
@abhiTronix abhiTronix added this to the v0.1.6 milestone Dec 12, 2019
@abhiTronix abhiTronix self-assigned this Dec 12, 2019
abhiTronix added a commit that referenced this issue Dec 12, 2019
abhiTronix added a commit that referenced this issue Dec 16, 2019
- ⚠️ Dropped python 2.7 legacy support for vidgear.

- Enhancements/Updates:
  - VideoGear API:
    * Added `framerate` global variable and removed redundant function.
    * Added `CROP_N_ZOOM` attribute in Videogear API for supporting Crop and Zoom feature.
  - WriteGear API: Added new `execute_ffmpeg_cmd` function to pass a custom command to its FFmpeg pipeline.
  - CLI & Tests updates:
    * Replaced python 3.5 matrices with latest python 3.8 matrices in Linux environment
    * Added full support for CODECOV in all CLI environments
    * Updated OpenCV to v4.2.0-pre(master branch). 
    * Added various Netgear API tests
    * Added initial Screengear API test
    * More test RTSP feeds added with better error handling in CamGear network test
    * Added tests for ZMQ authentication certificate generation
    * Added badge and Minor doc updates
  - Stabilizer class Update:
    * Added new Crop and Zoom feature 
    * Added `crop_n_zoom` param for enabling this feature
    * Updated docs
  * Overall APIs Code and Docs optimizations and minor tweaks

- Bugfixes
  - NetGear API: 
    * Fixed random freezing in `Secure Mode` and several related performance updates
    * Eliminated redundant code blocks
    * Disabled `overwrite_cert` for client-end
  - CamGear API:
    * Fixed Assertion error in CamGear API during colorspace manipulation (#78)
    * Implemented better error handling of colorspace in videocapture APIs
    * CamGear will now throw `RuntimeError` if source provided is invalid
    * Updates for threaded Queue mode in CamGear API for robust performance
    * Added additional logging messages for CamGear API 
  * Fixed Code indentation in `setup.py`
  * Numerous Bug  fixes
@abhiTronix
Copy link
Owner Author

Successfully resolved and merged in commit: c8a6339

@abhiTronix abhiTronix added SOLVED 🏁 This issue/PR is resolved now. Goal Achieved! and removed BUG CONFIRMED ✅ Bug is confirmed! WORK IN PROGRESS 🚧 currently been worked on. labels Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG 🐛 Vidgear api's error, flaw or fault SOLVED 🏁 This issue/PR is resolved now. Goal Achieved!
Projects
None yet
Development

No branches or pull requests

1 participant