mirror of
https://github.com/opencv/opencv.git
synced 2024-12-04 16:59:12 +08:00
23 lines
381 B
Python
23 lines
381 B
Python
|
#! /usr/bin/env python
|
||
|
"""
|
||
|
This script will test highgui's image loading functionality
|
||
|
for .sr files
|
||
|
"""
|
||
|
|
||
|
# file extension to check
|
||
|
EXTENSION = "sr"
|
||
|
|
||
|
# import check routine
|
||
|
import cvLoadImage
|
||
|
import sys
|
||
|
|
||
|
# check image file of extension EXTENSION,
|
||
|
# the function also exits and returns
|
||
|
# 0,1 or 77 accordingly.
|
||
|
|
||
|
if cvLoadImage.image_ok(EXTENSION):
|
||
|
sys.exit(0)
|
||
|
else:
|
||
|
sys.exit(1)
|
||
|
|