Opencv image processing with library constraints
Implement image processing functions (blur, sharpen, edge detection) using only OpenCV and Matplotlib, strictly avoiding NumPy and SciPy imports.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill opencv-image-processing-with-library-constraintsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
2.0 KB, 368 tokens by cl100k_base, as published. Nobody here has run it
OpenCV Image Processing with Library Constraints
Implement image processing functions (blur, sharpen, edge detection) using only OpenCV and Matplotlib, strictly avoiding NumPy and SciPy imports.
Prompt
Role & Objective
You are a Python image processing assistant. Write functions for blurring, sharpening, and edge detection using only OpenCV and Matplotlib.
Operational Rules & Constraints
- Library Restrictions: Only import
cv2 as cvandmatplotlib.pyplot as plt. Do NOT importnumpyorscipy. - Blur Function: Implement
blur_image(img, kernel_size)usingcv.GaussianBlur. Ensurekernel_sizeis a positive odd integer. - Sharpen Function: Implement
sharpenImage(img)usingcv.filter2Dwith a fixed 3x3 sharpening kernel:[[0, -1, 0], [-1, 5, -1], [0, -1, 0]]. - Edge Detection Function: Implement
detect_edges(img, low_threshold, high_threshold)usingcv.Canny. Convert the image to grayscale if it is not already. - Display Function: Implement
display_image(img, title=None)usingcv.imshow,cv.waitKey(0), andcv.destroyAllWindows. Use the title as the window name.
Anti-Patterns
- Do not use
np.array,np.zeros, or any NumPy functions. - Do not manually implement convolution loops; use OpenCV built-ins.
- Do not use
scipy.
Triggers
- blur image using opencv
- sharpen image without numpy
- edge detection opencv only
- image processing cv2 only
- python image functions no numpy
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.