Mask image in c#

Hello

I have problem on doing "Image mask" in c#.

I tried to use "Image mask of the KING" Assistant NI mink and create C code.

In C code, it uses "imaqROIToMask()";

"imaqMask();"

"imaqGetROIBoundingBox();"

I find similar functions by using the command "NationalInstruments.CWIMAQControls.AxCWIMAQVision".

Like this: axCWIMAQVision1.RegionsToMask ();

axCWIMAQVision1.MaskToRegions ();

axCWIMAQVision1.Mask ();

First of all, I don't know exactly what functions do the thing of 'extract_mask_image '.

Second, when I use "axCWIMAQVision1.RegionsToMask (, object modelImage, object fillvalue);" I have no idea how I assing the last two parameters and what is?

Thanks for the time.

Have you looked at the example Mask.sln I mentioned above? Its a VB example, but the syntax must be very similar to c#. In this example, that an image is loaded, then a mask is used to define the area of interest. For more information, please refer to this article to the developer zone: http://zone.ni.com/devzone/cda/tut/p/id/3616

Extract help CVI where parameters are described below:

imaqMask


Its use


int imaqMask (Image * dest,)
Source Image * const, const Image * mask);

Goal


Copy of the source image to the destination image in the following
way: If a pixel in the mask is 0, the function sets the
pixel source corresponding to 0. Otherwise, the function copies the
pixel source corresponding to the destination image.

Supported image types


IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX.
IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters



















Name

Type

Description

dest Image *. The destination image.
source const Image *. The source image.
mask const Image *. The image of the mask. This image should be a picture of IMAQ_IMAGE_U8.

Return value









Type

Description

int Success, this function returns a nonzero value. On
failure, this function returns 0. To get extended error information, call imaqGetLastError().

Tags: NI Hardware

Similar Questions

  • How to treat the original image and the mask image?

    I have a PDF file that contains an image that contain no filter to decode and mask image (SMask).

    Size of the mask image is much larger than the original image

    For example:

    Original image: width = 2 height = 1

    Image mask: 6 140 220

    How can I ask for the original image masking get the resulting image.

    Hi balasubramanians32220056,

    You can change the images in the acrobat application, edit images or objects in a PDF, Adobe Acrobat DC file. However, for the original image processing & the image of the mask, you will need application like Adobe Photoshop image processing.

    Kind regards
    Nicos

  • Add the dash of the masked image

    Is it possible to add a feature to a masked image (formed irregular)?

    MFJ

    Can you be more specfic that you want to add the line to. The content of the Image or the mask. If the mask do you want white, gray or black line.

    You can use the pen tool to create a path around the irregular shape. Then convert the path to a selection. Target the content of the layer or the layer mask. Then race the selection with the color of your choice to have time. If the race is the content of the layers. The layer mask can hide all or part of the race.

  • Is there a way to apply the shadow to a masked image effect?

    Is there a way to apply the shadow to a masked image effect? (Hidden through the default effect video opacity). When I try to do, the shadow effect applies to any image not only the hidden portion.

    I have not messed with the masks very well, but you're right. The shadow does not work on a masked image.

    I got it to work if by nesting the masked image.

  • Examples of Soft Mask images

    Hello

    I need to implement a soft mask for a PDF generator image support (specifically, we must be able to integrate PNG images with transparency), read the relevant sections in the PDF (section 8.9.6 and 11.6.5.3 8.9.5,) specifications, however I have several doubts:

    (1) are images Soft Mask the solution for this scenario, or is there another solution (we issue PDF 1.4 files).

    (2) what exactly is a subsidiary image XObject?

    (3) do I write an image XObject in another entry in the dictionary of the Image or by writing to the parent image SMask entry enough?

    (4) write the subsidiary image XObject as a steady stream in the SMask entry would be enough?

    (5) should I update the State of the graphics on the show the image with the soft mask parent?

    In addition, there are examples of this feature I can look at to be able to see more clearly how the soft mask images are implemented?

    1 - Yes, flexible masks are the way to go!

    2. which means that you create a valid Image XObject and then set it as the value of the /SMask key in the main image.  SMask image must be in the DeviceGray color space.

    3 see above (two separate objects, /SMask points from one to the other)

    4. water courses must make their own indirect objects

    5. No, if the mask is ONLY for the image (that it would be for the PNG conversion), so no change to the ExtGState.

    Open Adobe Photoshop or Illustrator or InDesign, place a PNG with transparency, save them in PDF format.

  • Why transform masked images leave a gray outline?

    I created a new layer mask to an image, but when I use the free transform tool to resize is smaller, there is a pale gray outline to the left around the image. Why is this happening and how can I get rid of him?

    OK just an update on this. I think that the response of Conroy may be technically correct, but it seemed to solve my problem by converting just a layer to a smart object. I can't have my problem very well described initially. In summary:

    Problem:

    Resizing a layer (making the smaller) with a style of using the free transform tool created drop shadow effect a grey outline around my image / object.

    Solution:

    Convert layer to smart object and then using the transform tool solved this problem.

  • two objects with a single mask image

    Hello guys

    can someone guide me how to tow mask objects (a box and other image) present in the same canvas with the third image which are also in the same canvas.i may hide a single object at a time, but need of solution both.any mask?

    Thanks in advance

    Vineet sharma

    Try puuting the box and the image in a single container (canvas, Hbox, etc) and mask the container.

  • need help with a degraded more than mask images XML

    I have a file which works fine by pulling images via XML data. I want to create a mask gradient using flash CS3, but I can't seem to get any sort of mask (solid or degraded) reacts with XML driven images.

    Download my FLA and other work files 845 kb

    Ah ok that explains why - you must set to export to the 8 player to use gradient masks. And you need to cache as bitmap to true so that the image also like:

    maskMC.cacheAsBitmap = true;
    imageMC.cacheAsBitmap = true;
    imageMC.setMask (maskMC);
    Stop();

  • soft-mask image stream

    Hello

    I try to add a transparent png image to PDF , but it comes with a black background png image, this isn't what I want.

    I know must be added image stream smask, but I don't know how to build.

    the bad result like this:

    2.png

    the good result like this:

    1.png

    Thank you.

    If you want to see the file:

    http://pan.Baidu.com/s/1dErlQut

    ProcSet used to be important, but today is ignored.

    You must read the alpha channel of the PNG file and use it to set the SMask data. You may need to convert the representation, it must understand the PNG format in detail as well as PDF.

  • Images in the clipping in Illustrator CC mask missing in PDF

    I've attached a screenshot of a thumbnail of a pdf that I got from a printer. The red zone is supposed to contain an image. I have cultivated the image using a clipping mask. There are several pages where my cut image is missing (see another screenshot - it is not red in the second picture, because it is not a miniature), but there are a few pages where an image cut is not missing.

    When I opened the pdf file there is a message indicating an error exists in the page. I do a correlation that the error is related to my clipping mask images.

    Anyone has any ideas for troubleshooting?

    Screen Shot 2015-12-14 at 2.19.26 PM.pngScreen Shot 2015-12-14 at 2.27.58 PM.png

    In fact, the problem rested in the transmission of the file to the printer. The printer should return the pdf I by Member. Somehow the file acquired errors because of the way in which it was transmitted.

  • Animated image affected by a mask

    I am trying to mask an image in Adobe Premiere so that it becomes transparent and you can see only a square of it.

    What I did: I placed a background image on the video track 1, front image on the video track 2, and I imported a mask image on the video track 3.

    Then I applied the effect 'Matt track touch' to the image before (track 2) and chose the image of the mask as a cache in the options of controlling effects.

    My problem: I want to change the position and scale of the before image along the timeline with the mask in the same position and scale, in order to simulate a moving inside a square image and showing around the background image; but when I try to zoom in or move the image before the masking moves also, ruining the effect.

    Question: Is possible to produce a masking in a way that, when changing the position or scale of the affected image (image before on track 2), masking area will remain in the same position of the display and the scale as in the original? How to do this?

    Thank you

    The animation may not be in the same timeline, it has be nested:

    first animate.

    then the nest.

    and finally add the mask to the sequence embedded in the main timeline.

    in this order, it should work.

  • Masks of images?

    I have always received this warning after you save a PDF file that contains JPEG files.  That is, how will this affect my final PDF, and how can I solve this problem?

    My main concern here is whether or not I could be out less large files my final PDFs if this "corrected" warning

    Untitled.jpg

    "The PDF contained masks of images that were not sous-échantillonnées."

    See my explanation of masks to images here: http://forums.adobe.com/message/4227572#4227572

    It is not really something you need to 'fix', is only a warning because in some cases, it could lead to some strange Visual effects around the edges of a masked image.

  • How to merge two images with a mask?

    Here are the directions that I used and does not work.  I opened 2 images in Fireworks cs3.  I used the Oval Marquee tool and an area I want to merge into the second image selected.  I went to edit/copy.  Opened the second picture I want this domain to merge. Edition and paste as mask.  I get a small oval faded picture and the rest of my image disappeared.

    Your help is greatly appreciated!

    I guess, but I think that what you want is an oval section of an image to another image? If so, then the bottom image should not be hidden and does not even need to be considered. Think that as background.

    Try this instead:

    1. Turn off the visibility of the lower background image, so it does not distract you.
    2. Make an ellipse white vector with the proportions that you want and position on the area of the image that you want a oval. You can adjust the opacity of the vector ellipse to help with positioning, but make sure you set the opacity to 100%.
    3. Selects the image and the ellipse, and then click Modify > mask > Group as mask.
    4. Turn on the visibility of your background image and position your masked image.  (I think that gives you what you want).

    Your vector mask must be white in this case. A white area in a mask will be opaque hidden object. A black or transparent area in a mask will make the hidden sector transparent. A gray or semitransparent box in a mask will be proportionally semi-transparent hidden object.

    This is what you want?

  • beyond the image mask color

    I often have people mask images to put them in an architectural setting. I so everything first open the image with a person, to convert the bottom of layer 0, add a layer mask and paint around the person with the black.

    When I drag this layer to another then (enlargement), the mask around the person is black only as much as the original image size image of this person. around him he is white. When the scaling this image + mask, a thin frame appears sometimes, while the outer edge of pixel is interpolated and not completely black more. This must be retouched every time.

    now, by chance, I did it 'right', in the sense that when you drag the image of the little person, the mask was completely black around the person. so there must be a way to make things right from the beginning. I tried to find what I have done in history, but the last 20 acts were brushing.

    Anyone know how I can put the entire area of a layer beyond the borders of the image mask to black? I tried, but did not work:

    activate the layer mask, select all, reverse, fill it with black (cmd + backspace when bg color is black).

    I found a solution that works, but it's more complicated than the contours of the new layout of the image-editing.

    Thank you.

    Wim

    I know exactly what you talk about and very glad you posted this.

    What works is if you start with a new layer with no mask. Then draw a rough selection lasso around your object, then click adding a layer mask icon.

    What also works is hold the option key before clicking on the Add layer mask button. Your mask is filled with black, then paint to keep the areas with a white brush.

    What causes the problem is if you click on add a layer mask button and then start to use the brush to paint the areas.

    It has to do with, if you helped photoshop know what color the mask is filled beyond your exisitng Web.

  • Import image as a mask or how to use an alpha for transparency mask mask

    Hello

    Basically, I need to know how to upload 1 image in another image as a mask.

    What I'm doing:

    I have a lot of large images that put together are 1 very large image (images of Earth ortho). I also have corresponding images, allows you to refer to them as images of masks, which hide a part of the big picture ortho I too want to import it. These mask images basically look like a mask of PS. They are black feathers to white images. I need to be able to import them as a mask.

    Y at - it outdoors, if yes how?

    Thank you!!!

    Copy the source mask to the Clipboard. In the destination doc, add a layer mask to the desired layer. In the palette layer, select the layer mask channel, make sure that it is set to visible and hide all the other channels. Paste the source into the pattern string.

    You may need to invert the mask to properly operate.

Maybe you are looking for

  • How to set up multiple home pages to open in a separate window (not a tab) when you want...

    I would like to install and be able to click on a profile of Firefox (I guess that the profile) or pass parameters to the firefox.exe and Open firefox about 6 separate windows (not tabs) on different home pages. If I use the vertical bar in the Optio

  • Equium M70 - no icons or photo on your TV screen

    I have connected an S-video cable on my TV via my laptop. All I get on my TV is the image of the desktop, nothing else.I want to see is what I see on my laptop. Icons, files, internet, email, ect, ect. Is it possibleor should I do something else.

  • HP Officejet Pro 8500 has more freeze scans

    After the digitization of several documents by using HP scan software on computer, the printer stops.   To start again, you must turn off the computer - wait a few minutes to make the message "turn", then wait several more minutes for the printer to

  • delay in the launch of exe

    I created exe and installer in labview 11. I installed it in pc win 7, and the software works very well... But in the beginning when I run the program, exe takes some delay to launch... It takes around 90 seconds...

  • Problems of updating HP dc7700 SFF NIC driver

    Hi all! I have a HP dc7700 SFF desktop I have been working to rebuild. I restored it to out of State of the box with the built-in HP restore partition, put the OS Win XP Pro SP2. The Integrated NIC is a processor Intel 82566 DM. The default driver is