Welcome![Sign In][Sign Up]
Location:
Search - foreground extract

Search list

[GUI Developbrew window manager

Description:

 

Objective
This topic describes how to create a windowed application that will share the display with other applications.
Brew® MP windowed applications need to be written differently than traditional Brew MP applications. Traditional Brew MP applications, when running in the foreground, occupy full screen space and can modify the display at any time. In the windowing framework, multiple applications share the display at the same time and are not allowed to modify the display arbitrarily. A windowed application also needs to create one or more widgets to be used to create the windows.
A windowed application needs to:
·                  Create and initialize one or more widgets to be passed to IWindowMgr_CreateWindow().
The application can implement its own IWidget, or it can make use of an existing IWidget.
·                  Handle the EVT_APP_START_WINDOW event (and create a window).
·                  Implement handlers for visibility changes, focus changes, and extent changes. The implementation of these handlers is dependent on the details of the application.
·                  Draw in two stages:
·                                  Tell the container that drawing is necessary (ICONTAINER_Invalidate()).
·                                  Draw only when told to draw by the container (IWIDGET_Draw()).
Note: A windowed application should not call any functions that modify IDisplay directly. This includes explicit IDisplay function calls or implicit updates, such as calls to IIMAGE_Draw() or ICONTROL_Redraw(). Drawing should happen only on demand, for example, when IWIDGET_Draw() is called for the widget used to create the window. Existing Widget based applications follow these guidelines and, with minor modifications, can be ported to the windowing framework.
Event handling
A windowed application must respond to these events:
EVT_APP_START_WINDOW and EVT_APP_START
A window-based application receives EVT_APP_START_WINDOW first. If the application returns TRUE for this event, the application does not receive EVT_APP_START. If an application needs to support both the environments (window based and non-window based), it should handle both events.
When the application receives EVT_APP_START_WINDOW, it should create one or more windows.
If creation of IWindowMgr0 fails while handling EVT_APP_START_WINDOW, the application should assume that the platform does not support window-based applications. In this case, the application should return FALSE and continue the application logic in the code for EVT_APP_START.
EVT_APP_SUSPEND and EVT_APP_RESUME
After an application returns TRUE for EVT_APP_START_WINDOW, it will not receive EVT_APP_SUSPEND and EVT_APP_RESUME as non-windowed Brew MP applications do. Instead, the application must check for window status events that are sent to the widget through EVT_WDG_SETPROPERTY events. For EVT_WDG_SETPROPERTY events, wParam indicates which property was set, and dwParam specifies the value of the property. When the AEEWindowMgrExt_PROPEX_STATE property has a value of AEEWindowMgrExt_STATE_VISIBLE, the window is visible.
EVT_WDG_WINDOWSTATUS
The EVT_WDG_WINDOWSTATUS event is sent to a widget to notify it about various window related status messages. AEEWindowStatus.h contains information on the meaning of various status messages.
Sample code location

ZIP filename
Location
Run app
hellowindowapp
Brew MP Library
·                       Download and extract the ZIP file.
·                       Compile the app.
·                       Run it on the Brew MP Simulator.

Example of a windowed application
In the hellowindowapp sample, HelloWindowApp_HandleEvent handles the EVT_APP_START_WINDOW event and creates soft key and pop-up windows:
   case EVT_APP_START_WINDOW:   
      DBGPRINTF("EVT_APP_START_WINDOW");
 
      // Create the softkey and popup windows
      HelloWindowApp_CreateSoftkey(pMe);
      HelloWindowApp_CreateOrActivatePopup(pMe);
 
      // Handling this event tells Brew that we are a windowing
      // application.
      return TRUE;  
HelloWindowApp_CreateSoftkey() creates the soft key widget, sets the color text of the widget, then calls HelloWindowApp_CreateWindow() to create the window.
   WidgetWindow *pWindow = &pMe->softkeyWindow;
  
   if (pWindow->piWindowWidget != NULL) return;
   pWindow->pszDbgName = "Softkey";
   pWindow->pMe = pMe;
  
   (void) ISHELL_CreateInstance(pMe->applet.m_pIShell, AEECLSID_SoftkeyWidget,
            (void **) &pWindow->piWindowWidget);
   if (pWindow->piWindowWidget == NULL) return;
 
   {
      WidgetExtent extent = {0, HWA_SOFTKEY_HEIGHT};
      IWidget_SetExtent(pWindow->piWindowWidget, &extent);
   }
  
   (void) IWidget_SetBGColor(pWindow->piWindowWidget, MAKE_RGBA(200,200,200,255));
  
   // Now set the softkeys text
   {
      IWidget *piTextWidget = NULL;
      (void) IWidget_GetSoftkey(pWindow->piWindowWidget, PROP_SOFTKEY1, &piTextWidget);
     
      if (piTextWidget != NULL) {
         (void) IWidget_SetText(piTextWidget, L"Hover", TRUE);
      }
      RELEASEIF(piTextWidget);
 
      (void) IWidget_GetSoftkey(pWindow->piWindowWidget, PROP_SOFTKEY2, &piTextWidget);
      if (piTextWidget != NULL) {
         (void) IWidget_SetText(piTextWidget, L"Close", TRUE);
      }
      RELEASEIF(piTextWidget);
   }
 
   HelloWindowApp_CreateWindow(pMe, pWindow, AEEWindowMgrExt_CLASS_Softkey);  
HelloWindowApp_CreateWindow() creates the soft key window, as follows:
   int result;
   uint32 winId;
   AEEWindowProp propList[1];
  
   // Set custom window handler
   HANDLERDESC_Init(&pWindow->hdHandler, HelloWindowApp_WindowHandler, pWindow, NULL);
   IWIDGET_SetHandler(pWindow->piWindowWidget, &pWindow->hdHandler);
        
   propList[0].id = AEEWindowMgrExtProp_CLASS;
   propList[0].pbyLen = sizeof(winClass);
   propList[0].pby = (void *) &winClass;
     
   result = IWindowMgr_CreateWindow(pMe->piWindowMgr, (IQI*) (void *) pWindow->piWindowWidget,
      propList, ARR_SIZE(propList), &winId);
 
   if (result != SUCCESS) {
      DBGPRINTF("Window creation failed for %s: %d", pWindow->pszDbgName, result);
      HelloWindowApp_DestroyWindow(pWindow);
   } else {
      DBGPRINTF("Window %s created: id=%d", pWindow->pszDbgName, winId);
   }
HelloWindowApp_CreateOrActivatePopup() creates the widget for the pop-up window, then calls HelloWindowApp_CreateWindow() to create the pop-up window.
   pWindow->piWindowWidget = HelloWindowApp_CreateAndInitImageWidget(
                                pMe,
                                "popups.main" // Image as defined in appinfo.ini
                             );
 
   if (pWindow->piWindowWidget == NULL) return;
 
   {
      WExtent extent = {HWA_POPUP_WIDTH, HWA_POPUP_HEIGHT};
      IWIDGET_SetExtent(pWindow->piWindowWidget, &extent);
   }
 
   HelloWindowApp_CreateWindow(pMe, pWindow, AEEWindowMgrExt_CLASS_Popup);
Related information
·                  See Brew MP Widgets Technology Guide: Creating a Widgets application
·                  See Brew MP API Reference

Base version:
Brew MP 1.0
Tested version:
Brew MP 1.0
Phone tested:
No

 

Platform: | Size: 439828 | Author: bluecrest | Hits:

[Otherbgsub

Description: Determine the background of an image, llowing extract foreground objects
Platform: | Size: 55296 | Author: franco | Hits:

[Special Effectsgsc-1.1

Description: 用户指定指定图像的前景色和背景色,可以提取出用户想要提取的指定图像-Specified by the user specifies the image foreground and background colors, you can extract the user wants to specify the image extracted
Platform: | Size: 8348672 | Author: 郭顺超 | Hits:

[Special EffectsGMMsegmation

Description: 利用高斯混合模型进行视频前景运动目标的提取!请使用自己的AVI文件。-extract the foreground moving object using the Gaussian mixture model
Platform: | Size: 25600 | Author: zzgzzg99 | Hits:

[matlabword-beijing

Description: 背景建模 前景提取 前景识别 matlab程序-Background modeling prospect identification matlab program to extract foreground
Platform: | Size: 12288 | Author: gege | Hits:

[Special EffectsBackground_And_Foreground

Description: 背景、前景 提取,能在视频中准确提取背景信息从而提取前景信息-Extract Background And Foreground Image
Platform: | Size: 880640 | Author: abc | Hits:

[Picture ViewerImage-background-separation

Description: 程序实现一个自适应阈值的算法,用以在不规则光照下从背景中提取出前景图像。-Procedures to achieve an adaptive threshold algorithm to extract the foreground from the background image in the irregular light.
Platform: | Size: 206848 | Author: pengluo | Hits:

[OpenCVGMM

Description: 使用openCV写的高斯混合模型前景分离作业。-Extract the foreground from video sequence using Gaussian Mixture Model(GMM)with openCV.
Platform: | Size: 8947712 | Author: 共由俊 | Hits:

[Windows DevelopContourExtract

Description: 利用opencv和visual C++ 实现的可以正确的提取图像中前景的轮廓,结合MFC编程,可以直接编译和运行。-Using OpenCV and visual of C++ to achieve can correctly extract the image foreground contour, with the MFC programming, can be directly compiled and run.
Platform: | Size: 12055552 | Author: zhangliwei | Hits:

[Special Effectskoutu

Description: 本程序基于matlab,能够实现对视频中图像进行抠图,并能将提取出的前景图像合成到新的背景上。-Matting, and can extract the foreground image is synthesized into a new background video image.
Platform: | Size: 44190720 | Author: zhuzhiling | Hits:

[Other systemsjybbs

Description: 最新论坛asp网站源码! 将论坛代码压缩包解开包,保持文件的相对位置,将解压后得到的全部目录、文件包括所有空目录上传到你的服务器上,论坛基本上就可以使用了,您可以进入后台管理设置一些参数。 默认的管理员帐号:admin 前台密码:admin 后台密码:admin 后台Sql密码:admin 2012年05月05日发布几个说明: 修复论坛首页【论坛联盟】不对齐现象 index1.asp这个文件是显示最新主题和热门主题的首页文件,若您要在主页显示【最新主题】和【热门主题】只要把原来的index.asp删除!再把index1.asp修改成index.asp即可-Latest Forum asp website source! Forum code compression unwrap the package to maintain the relative position of the file will extract all the directories, files uploaded to your server, including all empty directories, forums basically can use, you can enter the Admin set some parameters. The default administrator account: admin foreground Password: admin background Password: admin background Sql Password: admin 2012 05 05 released a few instructions: Repair Forum Home [Forum Alliance] not aligned phenomenon index1.asp this file to display the latest topics Home and Hot Topic, If you want to display on the home page [the latest theme] [Hot Topic] as long as the original index.asp delete! And then index1.asp modified index.asp can
Platform: | Size: 790528 | Author: herrow | Hits:

[Special EffectsForegroundExtract

Description: 视频捕捉的对象中,背景通常保持不变。一般分析中关注移动的前景物体,威力提取出前景物体,需要建立背景的模型,将模型和当前帧进行比对检测前景物体。前景提取应用非常广泛,特别是在智能监控领域中。 如果有不含前景物体的背景图片,提取前景的工作相对容易,只需要比对当前帧和背景图片的不同,调用函数absdiff实现。但是大多数情况,获得背景图片是不可能的,比如在复杂的场景下,或者有光线条件的变化。因此,就需要动态的变换背景。一种简单的办法是对所观察到的图片取平均,但这样做也有很多弊端,首先,这种办法在计算背景图片的前需要输入大量的图片,其次我们进行取平均的过程中不能有前景物体进入。所以一种相对好的办法是动态建立背景图片并实时更新。-Video capture of the object and the background usually remain unchanged. General analysis focus on the prospect of moving objects, power extract prospect object, it is necessary to set up the background model, the model and comparing the current frame detection prospect object. Foreground extraction are widely used, especially in the field of intelligent monitoring. If there is no prospect of object containing the background picture, extraction prospect work relatively easy, only need than current frame and background picture is different, absdiff called function realization. But in most cases, it is impossible for the background picture, such as in a complex scene, or a light conditions change. Therefore, it needs to the dynamic transformation background. A simple solution is to take pictures of the observed average, but this also has a lot of disadvantages, first of all, this kind of method in the calculation of the background picture first need to enter a lot of pictures, secondl
Platform: | Size: 1247232 | Author: dsfewf | Hits:

[Graph RecognizeVehicle-Recognition-System

Description: 1.首先单击载入图像菜单项(载入背景和前景图像),图像在image文件夹下面。 2.然后单击车辆提取菜单项,依次进行图像做差、二值化、开运算、图像去噪、图像填充处理。 3.再单击轮廓提取菜单项,提取车辆轮廓。 4.最后单击车型识别菜单项,对车辆进行识别。 -First click Load Image menu item (loaded background and foreground images), below the image in the image file folder. Extract menu items. Then click the vehicle, followed by image do poor binarization, open computing, image denoising, image-filled treatment. 3. Click contour extraction menu item, and to extract the vehicle contour. Finally, click the the models identify menu items, to identify the vehicle.
Platform: | Size: 2669568 | Author: 黑猫 | Hits:

[Special Effectsdangaosi

Description: 利用单高斯建模方法提取运动图像中的前景部分。有算例。-Using the single Gaussian modeling method to extract the foreground portion of the moving image. There are examples.
Platform: | Size: 2200576 | Author: glf | Hits:

[Special Effectshsv_file

Description: 本代码主要是基于HSV的阴影检测及消除,分别提取前景及背景图像,进行色彩空间转换。HSV空间类似人类感觉色彩的方式,可以更加准确地识别阴影,并保持在计算上简单。-This code is mainly based on the HSV shadow detection and elimination, extract the foreground and the background image, respectively, for color space conversion. HSV space is similar to the ways the human feel color, can more accurately identify the shadow, and keep it simple in calculation.
Platform: | Size: 1024 | Author: 肖伟 | Hits:

[Special EffectsRobustMatting_1.45

Description: 一个鲁棒 matting 的程序,可生成trimap,可手动画出前景,背景,trimap,提取图像-A robust matting program can generate trimap, you can manually draw the foreground, background, trimap, extract images
Platform: | Size: 2755584 | Author: hanyu | Hits:

[Special Effectstry2

Description: 对输入视频文件首先进行处理,使用高斯背景建模的方法,提取出视频的前景,然后对视频前景提取出其MSRE区域,并使用不同的颜色标记,最终保存成视频文件的形式。-First, the input video file is processed using a Gaussian background modeling method to extract the video foreground, and then extract its MSRE video prospect area, and use a different color marker, and ultimately saved as a video file format.
Platform: | Size: 8578048 | Author: 黄凯 | Hits:

[Graph Recognizechengxingshibie

Description: 1.首先单击载入图像菜单项(载入背景和前景图像),图像在image文件夹下面。 2.然后单击车辆提取菜单项,依次进行图像做差、二值化、开运算、图像去噪、图像填充处理。 3.再单击轮廓提取菜单项,提取车辆轮廓。 4.最后单击车型识别菜单项,对车辆进行识别。 -1 First, click Load Image menu item (load background and foreground image), the image in the image folder below. (2) and then click the menu item to extract the vehicle, in turn image so poor, binarization, open computing, image denoising, image fills processing. 3 menu item and then click the contour extraction, extraction vehicle contours. 4 Finally, click the menu item model identification, vehicle identification.
Platform: | Size: 2668544 | Author: 才子 | Hits:

[Other systemsgjshop3_1

Description: 1、下载完成后,直接解压下载的文件。 2、将解压后的文件web目录下的所有文件上传到网站空间上。(如果是mssql数据库版则需配置数据库,和修改db.config中的SQL用户名、密码和数据库名称) 3、默认后台/前台管理地址:你的网址/login.aspx 默认后台管理帐户:gjshop 默认后台管理密码:gjshop 4、登陆后台后进行相关网站设置和内容发布。 -1, the download is complete, extract the downloaded file directly. 2, the extracted file web directory of all files uploaded to the site space. (If you need to configure the database mssql database version, and modify db.config the SQL user name, password, and database name) 3, the default background/foreground Management Address: Your Website/login.aspx default admin account: gjshop default Admin password: gjshop 4, after landing the background settings and content publishing related sites.
Platform: | Size: 987136 | Author: as | Hits:

[Special EffectsCheXingShiBie

Description: 1.首先单击载入图像菜单项(载入背景和前景图像),图像在image文件夹下面。 2.然后单击车辆提取菜单项,依次进行图像做差、二值化、开运算、图像去噪、图像填充处理。 3.再单击轮廓提取菜单项,提取车辆轮廓。 4.最后单击车型识别菜单项,对车辆进行识别。-1 First, click Load Image menu item (load background and foreground image), the image in the image folder below. 2 and then click the menu item to extract the vehicle, in turn image so poor, binarization, open computing, image denoising, image processing filling. 3 menu item and then click the contour extraction, extraction vehicle contours. 4 Finally, click the menu item model identification, vehicle identification.
Platform: | Size: 2694144 | Author: 张三 | Hits:
« 12 3 »

CodeBus www.codebus.net