old ape Python

OpenCV image operation + Moviepy realizes video rotation and overlay

☞ ░ Go to Lao Yuan Python blog /LaoYuanPython ░ I. Introduction In ” [OpenCV-Python Common Image Operations: Addition, Subtraction, Multiplication, Division, Power Root, Logarithm and Bit Operations] “, the main image operations of [OpenCV] are introduced . The video is composed of frames of images. Through the flexible use of OpenCV and Moviepy, some …

OpenCV image operation + Moviepy realizes video rotation and overlay Read More »

Encyclopedia and comparative analysis of event capture methods for GUI graphical interface applications implemented by PyQt (Python+Qt)

I. Overview [In the graphical interface] application of PyQt , the event processing is similar to the message processing of the Windows system. After an application with a graphical interface is started, event processing is the main loop of the application. Event processing is responsible for receiving events, distributing events, and receiving the return results …

Encyclopedia and comparative analysis of event capture methods for GUI graphical interface applications implemented by PyQt (Python+Qt) Read More »

What happens when the custom class does not define the lt method in Python and uses sortsorted sorting

In [“Section 8.23 ​​Analysis of the Relationship between Sort/sorted Sorting and”Rich Comparison”Method in Python”] , the sorting method sort and the function sorted call the lt method by default to perform sorting and comparison when no key parameter is provided. What will Python do if there is no lt method defined in the class? Let’s …

What happens when the custom class does not define the lt method in Python and uses sortsorted sorting Read More »

Using OpenCV-Python to realize photo bottom change based on RGB color space

☞ ░ Go to Lao Yuan Python blog post directory /LaoYuanPython ░ I. Introduction A while ago, my family applied for the teacher’s qualification certificate exam. Due to the registration, the digital photos with a blue background had to be replaced with white ones. Although the old ape was learning image processing-related development techniques, he …

Using OpenCV-Python to realize photo bottom change based on RGB color space Read More »

Section 8.15 Python overriding the repr method of a custom class

I. Introduction The previous two sections introduced the function and syntax of the str and repr methods in Python classes respectively. All new classes support these two methods, because the [object class] implements these two methods, but in fact you In the process of customizing classes, developers should rewrite related methods, especially the output of …

Section 8.15 Python overriding the repr method of a custom class Read More »

Section 8.13 Detailed explanation of the built-in method repr in Python classes

When we input an object in the interactive environment, the information of the object will be displayed directly. In the interactive environment, inputting print(object) or print(object) in the code will also output the information of the object. These output information are related to two built-in methods: the str method Related to the repr method, these …

Section 8.13 Detailed explanation of the built-in method repr in Python classes Read More »

Section 15.40, PyQt (Python+Qt) combat moviepy implements MP4 video to gif animation tool

Column: Python Basic Tutorial Directory Column: Using PyQt to Develop Graphical Interface Python Applications Column: Getting Started with PyQt Old ape Python blog post directory I. Introduction When I wrote ” [Section 15.39, PyQt Human-Machine Dialogue Case of QDockWidget Nested Layout of SplitDockWidget and TabifyDockWidget: Stupid Robot] “, in order to illustrate the role of …

Section 15.40, PyQt (Python+Qt) combat moviepy implements MP4 video to gif animation tool Read More »

Section 14.6 uses Python urllib.request to simulate the implementation code for browser access to web pages

It is very simple for Python to access a web page and read the content of the web page. In the case of constructing the request header of the request http message using the method of ” [Section 14.5 Using the HTTP Information Obtained by the Browser to Construct the HTTP Request Header for Python …

Section 14.6 uses Python urllib.request to simulate the implementation code for browser access to web pages Read More »

Section 14.5 uses the http information obtained by the browser to construct the http request header for Python web page access

Introduction In ” Section 14.3 Using Google Browser to Obtain HTTP Information of Website Access “and” Section 14.4 Using IE Browser to Obtain HTTP Information of Website Access “, we introduce how to use Google browser and IE browser to obtain website access. http-related packet information. This section describes how to use the obtained information …

Section 14.5 uses the http information obtained by the browser to construct the http request header for Python web page access Read More »