嵌入VISION的cvi程序

发布时间:2021-06-07

#include <windows.h>

#include <cvirte.h>

#include <userint.h>

#include <ansi_c.h>

#include "mil.h"

#include <utility.h>

#include "nivision.h"

#include "video_test.h"

#define Image_X 768

#define Image_Y 576

#define WINDOW_TO_USE 0

static int panelHandle;

static int ImaqHandle; // will contain the handle to the imaq window

static int windHandle; // will contain the handle to the CVI window

Image *image;

unsigned char myArray[Image_Y][Image_X];

int windowHandle,disp,x,y;

Point position;

MIL_ID MilApplication, /* Application identifier. */

MilSystem, /* System identifier. */

MilDisplay, /* Display identifier. */

MilDigitizer, /* Digitizer identifier. */

MilImage; /* Image buffer identifier. */

int main (int argc, char *argv[])

{

if (InitCVIRTE (0, argv, 0) == 0)

return -1; /* out of memory */

if ((panelHandle = LoadPanel (0, "video_test.uir", PANEL)) < 0)

return -1;

DisplayPanel (panelHandle); //显示面板

imaqSetupWindow(WINDOW_TO_USE,0);//设置窗口的性质;窗口号,定义窗口的行为 //imaqSetWindowPalette(WINDOW_TO_USE,2,NULL,0);

position.x=1;position.y=1;

imaqMoveWindow(WINDOW_TO_USE,position);//移动图像窗口,窗口号,窗口左上角的位置

image = imaqCreateImage (IMAQ_IMAGE_U8, 0);//创建一个图像

/*set the image window to be one part of the CVI window*/ //设置图像窗口的CVI窗口 windHandle = (int) FindWindow (NULL, "Video Test"); // get CVI window handle

ImaqHandle = (int) imaqGetSystemWindowHandle(0); //返回一个窗口句柄

嵌入VISION的cvi程序.doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219