Skip to content

Commit d3f11b4

Browse files
committed
Deploy Computer Vision Pipelines with OpenCV on Google Cloud C4A Axion VM
Signed-off-by: odidev <odidev@puresoftware.com>
1 parent 0154cab commit d3f11b4

17 files changed

Lines changed: 892 additions & 0 deletions
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: Build Computer Vision Pipelines with OpenCV on Google Cloud C4A Axion VM
3+
description: Deploy and run OpenCV-based computer vision pipelines on Google Cloud Axion C4A Arm-based VMs, covering image processing, video pipelines, browser-based visualization, and integration with machine learning models.
4+
5+
minutes_to_complete: 45
6+
7+
who_is_this_for: This is an introductory topic for DevOps engineers, software developers, and AI practitioners who want to build and run computer vision pipelines on SUSE Linux Enterprise Server (SLES) Arm64 using OpenCV, process images and videos, visualize outputs in real time, and integrate ML models.
8+
9+
learning_objectives:
10+
- Install and configure OpenCV on Google Cloud C4A Axion Arm64 instances
11+
- Build image processing pipelines using OpenCV
12+
- Develop video processing pipelines with real-time frame updates
13+
- Visualize OpenCV outputs in the browser using an HTTP server
14+
- Integrate OpenCV pipelines with machine learning models
15+
16+
prerequisites:
17+
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled
18+
- Basic familiarity with Python and Linux command line
19+
- Understanding of basic image/video processing concepts
20+
21+
author: Pareena Verma
22+
23+
##### Tags
24+
skilllevels: Introductory
25+
subjects: ML
26+
cloud_service_providers:
27+
- Google Cloud
28+
29+
armips:
30+
- Neoverse
31+
32+
tools_software_languages:
33+
- OpenCV
34+
- Python
35+
- NumPy
36+
- Flask
37+
38+
operatingsystems:
39+
- Linux
40+
41+
# ================================================================================
42+
# FIXED, DO NOT MODIFY
43+
# ================================================================================
44+
45+
further_reading:
46+
- resource:
47+
title: OpenCV official documentation
48+
link: https://docs.opencv.org/
49+
type: documentation
50+
51+
- resource:
52+
title: OpenCV GitHub repository
53+
link: https://github.com/opencv/opencv
54+
type: documentation
55+
56+
- resource:
57+
title: NumPy documentation
58+
link: https://numpy.org/doc/
59+
type: documentation
60+
61+
weight: 1
62+
layout: "learningpathall"
63+
learning_path_main_page: yes
64+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# ================================================================================
3+
# FIXED, DO NOT MODIFY THIS FILE
4+
# ================================================================================
5+
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
6+
title: "Next Steps" # Always the same, html page title.
7+
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
8+
---
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: Get started with OpenCV on Google Axion C4A
3+
weight: 2
4+
5+
layout: "learningpathall"
6+
---
7+
8+
## Explore Axion C4A Arm instances in Google Cloud
9+
10+
Google Axion C4A is a family of Arm-based virtual machines built on Google’s custom Axion CPU, which is based on Arm Neoverse-V2 cores. Designed for high-performance and energy-efficient computing, these virtual machines offer strong performance for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
11+
12+
The C4A series provides a cost-effective alternative to x86 virtual machines while leveraging the scalability and performance benefits of the Arm architecture in Google Cloud.
13+
14+
To learn more, see the Google blog [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu).
15+
16+
## Explore OpenCV on Google Axion C4A (Arm Neoverse V2)
17+
18+
OpenCV (Open Source Computer Vision Library) is a widely used open-source library for building real-time computer vision and image processing applications. It provides optimized implementations for image transformations, video processing, object detection, and integration with machine learning models.
19+
20+
Key capabilities of OpenCV include:
21+
22+
* **Image Processing** for transformations, filtering, and feature extraction
23+
* **Video Processing** for frame-by-frame analysis and real-time pipelines
24+
* **Drawing & Visualization** for overlaying text, shapes, and annotations
25+
* **ML Integration** for combining computer vision with machine learning models
26+
27+
Running OpenCV on Google Axion C4A Arm-based infrastructure enables efficient execution of image and video workloads by leveraging multi-core CPU parallelism. This allows:
28+
29+
* Faster frame processing for video pipelines
30+
* Efficient memory utilization for image transformations
31+
* Improved performance-per-watt compared to x86 systems
32+
* Cost-effective scaling for computer vision workloads
33+
34+
Common use cases include real-time video analytics, image transformation pipelines, automated inspection systems, and ML-powered vision applications.
35+
36+
To learn more, visit the [OpenCV documentation](https://docs.opencv.org/) and explore the [OpenCV GitHub repository](https://github.com/opencv/opencv).
37+
38+
## What you've accomplished and what's next
39+
40+
In this section, you:
41+
42+
* Explored Google Axion C4A Arm-based VMs and their benefits for computer vision workloads
43+
* Understood OpenCV capabilities for image and video processing
44+
* Learned how Arm architecture improves performance and efficiency for OpenCV pipelines
45+
46+
Next, you'll create a firewall rule to enable browser-based visualization of OpenCV pipelines running on your Arm-based virtual machine.d in this Learning Path.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
3+
title: Create a firewall rule for OpenCV Browser Visualization
4+
5+
weight: 3
6+
7+
### FIXED, DO NOT MODIFY
8+
9+
layout: learningpathall
10+
11+
---
12+
13+
Create a firewall rule in Google Cloud Console to expose the required port for OpenCV browser-based visualization.
14+
15+
{{% notice Note %}}
16+
17+
For help with GCP setup, see the Learning Path [Getting started with Google Cloud Platform](/learning-paths/servers-and-cloud-computing/csp/google/).
18+
19+
{{% /notice %}}
20+
21+
## Configure the firewall rule
22+
23+
Navigate to the [Google Cloud Console](https://console.cloud.google.com/), go to **VPC Network > Firewall**, and select **Create firewall rule**.
24+
25+
![Google Cloud Console VPC Network Firewall page showing the Create firewall rule button in the top menu bar#center](images/firewall-rule.png "Create a firewall rule in Google Cloud Console")
26+
27+
Next, create the firewall rule that exposes the required port for OpenCV visualization.
28+
29+
Set the **Name** of the new rule to "allow-opencv-port". Select your network that you intend to bind to your VM.
30+
31+
Set **Direction of traffic** to "Ingress".
32+
33+
Set **Allow on match** to "Allow".
34+
35+
Set **Targets** to "Specified target tags".
36+
37+
Enter "allow-opencv" in the **Target tags** field.
38+
39+
Set **Source IPv4 ranges** to "0.0.0.0/0".
40+
41+
![Google Cloud Console Create firewall rule form configured for OpenCV with Ingress and Allow settings#center](images/network-rule.png "Configuring the OpenCV firewall rule")
42+
43+
## Configure port
44+
45+
Under **Protocols and ports**, select **Specified protocols and ports**.
46+
47+
Select the **TCP** checkbox and enter:
48+
49+
```text
50+
8000
51+
```
52+
53+
Then select **Create**.
54+
55+
![Google Cloud Console Protocols and ports section showing TCP checkbox selected with port 8000 configured for OpenCV Browser Visualization#center](images/network-port.png "Setting Ray ports in the firewall rule")
56+
57+
## What you've accomplished and what's next
58+
In this section, you:
59+
60+
* Created a firewall rule for OpenCV visualization
61+
* Enabled external browser access to your VM
62+
* Exposed port 8000 for real-time pipeline outputs
63+
64+
Next, you'll:
65+
66+
* Run image and video pipelines
67+
* Integrate ML models with OpenCV
68+
* Optimize performance on Arm-based systems
179 KB
Loading
23.5 KB
Loading
22.3 KB
Loading
261 KB
Loading
215 KB
Loading
381 KB
Loading

0 commit comments

Comments
 (0)