All Projects → Dovyski → Cvui

Dovyski / Cvui

Licence: mit
A (very) simple UI lib built on top of OpenCV drawing primitives

Programming Languages

python
139335 projects - #7 most used programming language
cpp
1120 projects

Projects that are alternatives of or similar to Cvui

Openlabeling
Label images and video for Computer Vision applications
Stars: ✭ 706 (+14.05%)
Mutual labels:  opencv, gui
Imgui
Bloat-free Immediate Mode Graphical User interface for JVM with minimal dependencies (rewrite of dear imgui)
Stars: ✭ 394 (-36.35%)
Mutual labels:  gui, imgui
Attendace management system
In this system we can fill attendance by face recognition
Stars: ✭ 135 (-78.19%)
Mutual labels:  opencv, gui
Rapidgui
Unity OnGUI(IMGUI) extensions for Rapid prototyping/development
Stars: ✭ 144 (-76.74%)
Mutual labels:  gui, imgui
Imgui Sfml
Dear ImGui binding for use with SFML
Stars: ✭ 596 (-3.72%)
Mutual labels:  gui, imgui
Webgui
An example demo of IMGUI (Immediate Mode GUI) on the web. Using only WebGL, GLFW and ImGui. Suitable for being compiled to web assembly (WASM).
Stars: ✭ 180 (-70.92%)
Mutual labels:  gui, imgui
Imgui Plot
An improved plot widget for Dear ImGui, aimed at displaying audio data
Stars: ✭ 332 (-46.37%)
Mutual labels:  gui, imgui
Nukleardotnet
.NET binding for the Nuklear immediate mode GUI
Stars: ✭ 126 (-79.64%)
Mutual labels:  gui, imgui
Iconfontcppheaders
C, C++ headers and C# classes for icon fonts: Font Awesome, Fork Awesome, Material Design, Kenney game icons and Fontaudio
Stars: ✭ 509 (-17.77%)
Mutual labels:  gui, imgui
Imgui Go
Go wrapper library for "Dear ImGui" (https://github.com/ocornut/imgui)
Stars: ✭ 499 (-19.39%)
Mutual labels:  gui, imgui
Bimpy
imgui for python
Stars: ✭ 144 (-76.74%)
Mutual labels:  gui, imgui
Layout
Single-file library for calculating 2D UI layouts using stacking boxes. Compiles as C99 or C++.
Stars: ✭ 551 (-10.99%)
Mutual labels:  gui, imgui
Imgui sdl
ImGuiSDL: SDL2 based renderer for Dear ImGui
Stars: ✭ 134 (-78.35%)
Mutual labels:  gui, imgui
Nuklear
A single-header ANSI C gui library
Stars: ✭ 13,365 (+2059.13%)
Mutual labels:  gui, imgui
Imgui
Immediate Mode GUI for C#
Stars: ✭ 133 (-78.51%)
Mutual labels:  gui, imgui
Love Nuklear
Lightweight immediate mode GUI for LÖVE games
Stars: ✭ 281 (-54.6%)
Mutual labels:  gui, imgui
Hello imgui
Hello, Dear ImGui: cross-platform Gui apps for Windows / Mac / Linux / iOS / Android / Emscripten with the simplicity of a "Hello World" app
Stars: ✭ 120 (-80.61%)
Mutual labels:  gui, imgui
Sonyheadphonesclient
A {Windows, macOS, Linux} client recreating the functionality of the Sony Headphones app
Stars: ✭ 123 (-80.13%)
Mutual labels:  gui, imgui
Nuklear
A single-header ANSI C immediate mode cross-platform GUI library
Stars: ✭ 5,055 (+716.64%)
Mutual labels:  gui, imgui
Dearpygui
Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies
Stars: ✭ 6,631 (+971.24%)
Mutual labels:  gui, imgui

cvui

A (very) simple UI lib built on top of OpenCV drawing primitives. Other UI libs, such as imgui, require a graphical backend (e.g. OpenGL) to work, so if you want to use imgui in a OpenCV app, you must make it OpenGL enabled, for instance. It is not the case with cvui, which uses only OpenCV drawing primitives to do all the rendering (no OpenGL or Qt required).

image

Features

  • Lightweight and simple to use user interface;
  • Header-only with no external dependencies (except OpenCV);
  • Based on OpenCV drawing primitives only (OpenGL or Qt are not required);
  • Friendly and C-like API (no classes/objects, etc);
  • Easily render components without worrying about their position (using rows/columns);
  • Simple (yet powerful) mouse API;
  • Modest number of UI components (11 in total);
  • Available in C++ and Python (pure implementation, no bindings).

Build

cvui is a header-only lib that does not require a build. Just add cvui.h (or cvui.py) to your project and you are ready to go. The only dependency is OpenCV (version 2.x or 3.x), which you are probably using already.

Usage

Check the online documentation or the examples folder to learn how to use cvui. The general usage in C++ and Python is shown below.

Usage in C++:

#include <opencv2/opencv.hpp>

// One (and only one) of your C++ files must define CVUI_IMPLEMENTATION
// before the inclusion of cvui.h to ensure its implementaiton is compiled.
#define CVUI_IMPLEMENTATION
#include "cvui.h"

#define WINDOW_NAME "CVUI Hello World!"

int main(int argc, const char *argv[])
{
	// Create a frame where components will be rendered to.
	cv::Mat frame = cv::Mat(200, 500, CV_8UC3);

	// Init cvui and tell it to create a OpenCV window, i.e. cv::namedWindow(WINDOW_NAME).
	cvui::init(WINDOW_NAME);

	while (true) {
		// Fill the frame with a nice color
		frame = cv::Scalar(49, 52, 49);

		// Render UI components to the frame
		cvui::text(frame, 110, 80, "Hello, world!");
		cvui::text(frame, 110, 120, "cvui is awesome!");

		// Update cvui stuff and show everything on the screen
		cvui::imshow(WINDOW_NAME, frame);

		if (cv::waitKey(20) == 27) {
			break;
		}
	}

	return 0;
}

Usage in Python:

import numpy as np
import cv2
import cvui

WINDOW_NAME = 'CVUI Hello World!'

# Create a frame where components will be rendered to.
frame = np.zeros((200, 500, 3), np.uint8)

# Init cvui and tell it to create a OpenCV window, i.e. cv2.namedWindow(WINDOW_NAME).
cvui.init(WINDOW_NAME)

while True:
	# Fill the frame with a nice color
	frame[:] = (49, 52, 49)

	# Render UI components to the frame
	cvui.text(frame, 110, 80, 'Hello, world!')
	cvui.text(frame, 110, 120, 'cvui is awesome!')

	# Update cvui stuff and show everything on the screen
	cvui.imshow(WINDOW_NAME, frame)

	if cv2.waitKey(20) == 27:
		break

License

Copyright (c) 2016 Fernando Bevilacqua. Licensed under the MIT license.

Change log

See all changes in the CHANGELOG file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].