Ubuntu系统下GTK安装

ubuntu gtk安装 GTK的安装 sudo apt-get install vim #使用vim来编写代码,当然您可以使用任何自己喜欢的编辑器 sudo apt-get install build-essential #这将安装gcc/g++/gdb/make 等基本编程工具 sudo apt-get install gnome-core-devel #这将安装 libgtk2.0-dev libglib2.0-de 阅读详情

1. GTK的安装

#这将安装gcc/g++/gdb/make 等基本编程工具
sudo apt-get install build-essential

#这将安装 libgtk2.0-dev libglib2.0-dev 等开发相关的库文件
sudo apt-get install gnome-core-devel

#用于在编译GTK程序时自动找出头文件及库文件位置
sudo apt-get install pkg-config

#这将安装 devhelp GTK文档查看程序
sudo apt-get install devhelp

#这将安装 gtk/glib 的API参考手册及其它帮助文档
sudo apt-get install libglib2.0-doc libgtk2.0-doc

#这将安装基于GTK的界面GTK是开发Gnome窗口的c/c++语言图形库
sudo apt-get instal glade libglade2-dev


2. 测试中的问题
在网上找一个用GTK编写的很简单的Hello World的源码,编译发现报错,错误如下:

stanwh@stanwh-ubuntu:~$ gcc -g -Wall gtkhello.c -o gtkhello
gtkhello.c:1: fatal error: gtk/gtk.h: 没有那个文件或目录
compilation terminated.

请注意之前我们安装的pkg-config,它是一个

在Ubuntu上安装GTK+框架 在Ubuntu上安装GTK+可以为开发者提供创建功能强大、美观的应用程序的能力。通过按照上述步骤,在Ubuntu上安装GTK+框架,并编译运行一个简单的GTK+应用程序。您可以继续扩展和开发这个应用程序,使用GTK+的各种功能和控件来构建更复杂的GUI应用程序。现在,让我们编写一个简单的GTK+应用程序作为示例。这将安装GTK+ 3的开发包,使您能够编译和运行基于GTK+的应用程序。一个简单的GTK+窗口将会显示,上面写着"Hello GTK"。接下来,我们将安装GTK+的开发包。在终端中,导航到包含。 阅读详情

相关推荐

从 YOLO 到视觉大模型:工程实践中如何选择?

本文对比了传统视觉模型YOLO与视觉大模型的差异。YOLO是单任务专用模型,适合规则明确、实时性要求高的检测任务;视觉大模型则具备通用视觉理解能力,但存在推理延迟大、算力成本高和"过度智能"等问题。在实际工程中,参数规模并非越大越好,7B-8B模型往往更均衡。控制大模型幻觉需通过严格Prompt设计、定向样本微调和任务拆解等方法。工业落地时应根据任务特性选择模型:YOLO适用于确定性高的场景,视觉大模型更适合复杂多变的环境。模型效果的关键在于任务边界、数据质量和系统设计,而非单纯追求参数

aiia18的博客 950

27-eMMC电路设计

eMMC硬件电路设计

weixin_66510961的博客 4007

4.图像sensor的特性和驱动解析

例子:sensor驱动自己提供操作曝光时间的函数和获取曝光时间的函数,然后将这个函数注册到ISP库和3A算法库,3A算法库根据外部光照强度计算出一个Sensor曝光时间的设置值,ISP库得到这个设置值,然后通过Sensor之前注册的回调函数,把这个值设置到Sensor的硬件寄存器中去,实现整个过程。是为 ISP 配置正确的输入时序。(1)修改驱动源码(sambashar\Hi3518E_SDK_V1.0.3.0\package\mpp\component\isp\sensor\ar0130)

weixin_53762042的博客 3566

基于 DnLUT 超高效的彩色图像去噪(CVPR 2025),本地部署 DnLUT 模型,图像去噪算法训练和推理,全网最详细教程

基于 DnLUT 超高效的彩色图像去噪(CVPR 2025),本地部署 DnLUT 模型,图像去噪算法训练和推理,全网最详细教程

在职AI算法工程师,擅长计算机视觉,YOLO目标检测、分割等,擅长web、pyqt界面可视化,好内容持续更新中,来这里跟大家一起学习,共同进步 364

LVGL(lv_canvas)

这篇文章介绍了LVGL图形库中的lv_canvas组件,主要内容包括: lv_canvas是一个绘图缓冲区对象,提供丰富的绘图API,可以理解为LVGL的"离屏画布"。 基本使用流程:创建缓冲区->创建canvas对象->设置缓存和尺寸->进行绘图操作。 详细列举了常用的绘图函数,如绘制线条、矩形、文字、图片等。 提供了示例代码展示如何创建画布并绘制一条红色线段。 介绍了canvas的典型应用场景,如动态波形绘制、自定义控件底图等。 对比了canvas与普通img的区别

m0_49476241的博客 1025

在 SAP 中,寄售业务(Consignment)与管道业务(Pipeline)都属于“物料先到、发票后到”的特殊采购模式,但两者的库存形态、物权转移时点、结算触发条件、系统配置完全不同

SAP中寄售业务与管道业务均属"先货后票"采购模式,但存在本质差异。寄售业务(如手机芯片)采用实物库存管理(标记"K"),物权在领用时转移,通过411K/201K移动类型触发负债;管道业务(如蒸汽)无实物库存,采用261P等移动类型直接消耗并生成应付。系统配置上,寄售需K类信息记录及GR收货,管道需P类信息记录且免GR。两者均通过MRKO汇总结算,但寄售按领用量计费,管道按提取量实时计费。核心区别在于库存形态与物权转移时点。

金牌架构师 557

复数值神经网络可能是深度学习的未来

复数这种东西,在人的头脑中似乎抽象、似乎复杂,然而,对于计算机来说,一点也不抽象,不复杂,那么,将复数概念推广到神经网络会是什么结果呢?本篇介绍国外的一些同行的尝试实践,请我们注意观察他们的进展。

gongdiwudu的专栏 6615

156、手机摄像头模组结构拆解:从保护盖到 FPC 连接器的完整装配剖面

本文深入解析手机摄像头模组结构设计要点。作者结合项目经验,指出保护盖密封胶在低温收缩会导致边缘漏光问题,强调结构细节比算法参数更关键。文章逐层拆解模组组件:保护盖厚度需平衡抗冲击与光学性能;镜筒内镜片组装配顺序和公差控制直接影响成像质量;IR滤光片厚度公差±0.02mm会改变红外截止波长;CSP封装需注意金线加固;FPC连接器的信号完整性和机械可靠性设计。最后给出5条实用建议,包括密封胶选型、镜片对位检测等,强调模组结构设计是"一票否决制"的基础工程。(149字)

sundong_81的博客 105

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

上一篇: 主机与VMware的Linux虚拟机之间共享交换文件
下一篇: 常用进程调度算法的分析与评价
StanMouse
博客等级 码龄16年 3粉丝 9原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值