Find a region in an image

hi everybody
i need to find a red region in an image . but i don't have any idea to do this as fast as possible . can u give any advices. i just need to find the beginning and the ending points of a red painted region in an image (there is only one red region)
thanks

i wanted to mean the "fastest method" while writing " as fast as" :)

Similar Messages

  • How can I save a region of an image into another image?

    How can I save a region of an image into another image? Should I use JAI?
    Java2d? Is there an example?
    Thank you.

    Here is what I try, but I find out I just get a black square for my output image, can you please tell me what am I missing?
              ImageIcon file=new ImageIcon("images/clouds.jpg"); // You can't open bmp files
                   // width, height looks correct:
                   System.out.println (" width" + file.getIconWidth());
                   System.out.println (" height" + file.getIconHeight());
                   BufferedImage bi = new BufferedImage(file.getIconWidth(), file.getIconHeight(),
                   BufferedImage.TYPE_INT_RGB);
                   int x = 0;
                   int y = 0;
                   BufferedImage subimage = bi.getSubimage(x, y, 40, 40);
                   File outputFile = new File("newimage.png");
                   ImageIO.write(subimage, "png", outputFile);

  • What values are stored in the alignment region of an image and how can they be set?

    I am calling a number of C++ functions with different variable sized LabView images at rates in excess of 20 images per second. I need to tell the C++ code developer what values to expect in the alignment region of the image. Right now I am creating an image with a zero border that is 32 byte aligned, so there is no alignment region and everything works fine.
    I would like to move to using normal LabView images, as it saves sereval steps and allows me to use a combination of LabView and C++ operations. I do not want to re-write all the C++ functions to be aware of the LabView alignment and border areas. I just want the alignment area and border area to be zero and process them like they were part of the image.
    I can set the border region to zero using Fill Image but I am not clear as to what the values will be in the alignment region, or if I can set them. Does Fill Image also fill the alignment region? Since the C++ code is being developed on a system without LabView, and I do not have the means to debug it on my LabView system, it is tricky to know what is in this region.
    In the ideal world, I would like it to be zero or to be able to set it to zero.
    Thanks in advance.
    Andrew

    Hi Andrew,
    The function IMAQ Fill Image allows you to set the border and all or part of your image to a certain pixel value that you define. One of the inputs to Fill Image is "Image Mask" which you can use to specify which pixels in your original image will be modified. This help document describes the Fill Image VI in detail and can provide some good information for you.
    Essentially, the locations of any non-zero pixels in your Image Mask are where the new pixel value will be set in your original Image. Does that make sense? So if you know where your alignment region is then you can use an image mask with Fill Image to set the alignment region and the border to zero. If you don't use an Image Mask, the Fill Image VI will assign the new pixel value to the entire original image. 
    Regards,
    Daniel H.
    Customer Education Product Support Engineer
    National Instruments
    Certified LabVIEW Developer

  • How to find a region in the Arrange Window

    I'm trying to find two audio files that are apparently in regions in my arrange window on Logic 9.  I can see them in my Audio Bin but I have no idea where to find them in my Arrange Window.  I don't know if they're wedged in between or underneath a hundreds of other regions (yes I have that many regions). 
    Is there a method or shortkey I can use to find these specific regions?  You know...like a "control F" for regions in the Arrange Window?  Ideally I want to get rid of these files but I don't want to have any "ghost regions" that might complicate things.  I just like to have everything nice and clean.
    Thanks for any help.
    p.s. In case someone asks these questions I already have answers:
    Q1: Why can't you just find the regions you're looking for manually?
    A1: Because I have too many regions in my Arrange Window.
    Q2: Why do you have so many regions?
    A2: Because that's how I work.  The number of regions I have shouldn't be related to the efficiency of looking for specific regions. 

    You could check if the regions may exist inside a take folder, a normal folder, or press H to see if you have any hidden tracks.
    But if you are brave enough to try to soft-delete all the other regions from the Bin, it should be easy to find the two remaing ones in the Arrange window, unless you also have a lot of MIDI regions. What happens if you select all the regions in the Audio Bin (Command-A), Shift-click on the two regions you talk about to deselect them, and then (temp.) delete all the regions in the bin? You can Undo this afterwards, but NB: remember to select "Keep" (and "for all") if you are asked whether you also want to delete the recordings from the hard disc itself.
    "Zoom To Selection": select a region (not a file) in the Bin, activate Arrange (eg by pressing tab one of more times until Arrange has a white-ish frame), and then press Z on your keyboard. This will zoom in on the selected region, another Z will show the whole arrangement again.
    "Play from Selection": press Shift and Enter.

  • JS CS3 How can I find -and delete- anchored empty images frames

    I have a script that works fine with text,
    I need the same function, but find and remove anchored empty image frames
    thx
    var myDoc = app.activeDocument
    for(var myCounter = myDoc.textFrames.length-1; myCounter>=0; myCounter--)
    var myFrames = myDoc.textFrames[myCounter]
    if (myDoc.textFrames[myCounter].contents == ""){
    myDoc.textFrames[myCounter].remove()

    I'd do it this way:
    1. Grab the document's allPageItems.
    2. Iterate over it, ignoring text frames.
    3. Check to see: (a) if the parent is a character and (b) if the graphics collection of the page item is empty. If so, delete it.
    Dave

  • I am using a MacBook Pro.  I simply cannot find a way to attach images adjusted in Lightroom as attachments and/or without massive degradation in quality.  I follow the LR attach email process as specified by LR, the photos appear in the email seemingly e

    I am using a MacBook Pro.  I simply cannot find a way to attach images adjusted in Lightroom as attachments and/or without massive degradation in quality.  I follow the LR attach email process as specified by LR, the photos appear in the email seemingly embedded and the recipients of the email cannot save the attachment.

    You are welcome.  Just finished a chat session with an Apple support rep and confirmed the matte option no longer available.  Seems lots has changed since I bought my 17” 19 months back:).  They did say that there were after market screen films available from places like amazon
    Have never used anything like that though.  My wife has a 2008 MBP 15” with gloss and I can say it is a nice screen finish, you just have to be careful of lighting from behind you.  All my iMacs were glossy and I did learn to compensate for the added brilliance the screen brought to the photos.  The new soft proofing feature of LR5 seems to better estimate the level of brightness of the printed work, compared to past versions of the s/ware.
    In any case, in my opinion you really can’t go wrong with the apple product.  I bought my first iMac in mid 1999 and have never looked back.  I donated that machine to a pre-school in 2008, it was running OSX version 2 or 3 I think.  I did run Photoshop 7.0 on an IBM laptop for a time (windows XP).  I think I had one of the very first versions of Adobe Camera Raw on that machine.  I digress, sorry.
    The chat representative did confirm that the 17” is out of production and I’m guessing Apple found the market for the big laptop just wasn’t there.  They did mention that 17” MBP’s show up as “certified refurbished” units from time to time.  Suggest you might explore that option with a local Apple store in the UK, assuming  Apple has store front operations off this continent of course.
    Please feel free to contact me with further questions if you wish.
    Take care, Gordy

  • Deleting photos than don't display in finder - just an icon not image

    Hi
    I have plugged in an old hard drive today I have not used for a while to get some old photos from.  There are thousands on the drive, but I notice in finder than many of them display as .jpg icons in finder and not with an image of the photo.  To no surprise, they don't open either.  I think it might have been a problem with the drive they came from, but do have copies so not concerned.
    Is there any quick way of deleting these thousands of non-working images from my hard drive to clear out the debris so I am only left with working photos.
    Thanks in advance.
    Matt

    Rob Cole wrote:
    I whole-heartedly agree that although the big print giveth, sometimes the small print taketh away, DNG-wise.
    I certainly would not convert my raw files to dng then throw away the originals. If Adobe provided a "revert from DNG" function, I'd recommend people give DNG a try (and not toss the originals), but as it stands:
    (Adobe-converted) DNGs: great for limited, known, (usually Adobe-only) environments, but not for wholesale conversion of raws, not yet anyway (unless you don't mind locking yourself into an Adobe-only (or Adobe-mostly) software environment, in order to support "the cause").
    PS - In my opinion, you may be going a little too far with this one:
    BarryLevine wrote:
    This is fraud.
    but still - point taken.
    Rob
    "Adobe-only environments". Nope, sorry; that doesn't exist. Adobe makes software that runs on OSX and Windows.
    I will bet $50 that buried in the OSX Lightroom code is reliance upon Quicktime. Adobe could rectify this. It's a lack of will, not technology.
    I can be angry and upset but I will still use Lightroom because, in spite of this setback, LR produces DNGs that are smaller than TIFF and lossless PNG and produces better photos easier than other apps (including Aperture).
    ...and yes, I still believe Adobe's marketing is either fraudulent or just doesn't understand the technology.

  • How to extract the license plate region from the image of cars

    HI, I want to extract the license plate region from the image of cars with vision assistant. I try to adjust the threshold value, remove small objects. But i still cannot get the perfect license plate region. I have attached 4 images that i am working now. I hope someone can help me to extract that region. Really thanks.
    Attachments:
    IMG_2029.JPG ‏150 KB
    IMG_2031.JPG ‏155 KB
    IMG_2089.JPG ‏130 KB

    Hi, I have attached my extrated images.. Please check them...
    Attachments:
    35.PNG ‏17 KB
    36.PNG ‏12 KB
    37.PNG ‏13 KB

  • I cant find UAE region in my iphone 4s

    i cant find UAE region in my i phone so can any one help me

    I don't really understand what you mean by region.  However, check Settings>FaceTime>On and Settings>General>Restrictions>FaceTime>ON. On the 4 & 4S FaceTime is accessed through contacts.  Go into your Contacts, access the contact you want to FaceTime with and you will see a tab at the bottom of their contact card.  You can also access FaceTime by going into your Phone app, select dialling keypad, dial number, press call and an option for FaceTime on the keypad will appear.

  • Colors in a specific region in an image

    hi all;
    i have an image and a list of 4 RGB colors.
    i need to check a specific region of the image (a small sub-image) to see if it contains any of the 4 colors i have.
    what my best option here?
    any help would be great.
    thanks in advance.

    This can be easily done with a StringBuffer:StringBuffer sb = new StringBuffer("leone24");
    sb.replace(5,7,"31");
    String newString = sb.toString();

  • How to find a Region id/name from a JTT jsp page

    Hi,
    i am on a SR details page , which i think is , ibuSRDetails.jsp in Isupport. How do i find which region it is belongs to ?
    I wanted to find out the region id /name so that i can customize the region.
    thansk
    -mahendra

    iSupport Documentation
    Or jsp source file. It will have the AK Developer Region Name.
    Or Search AK Developer Attributes with display name of the fields from SR form Header.
    May be iSupport experts might throw some light.
    HTH
    Srini

  • Find dpi & Align center of Image

    Hi All,
    I have new request but struggling in the below points:
    1. Find less than 300 dpi image in the active document
    2. Create text frame and fix center of the image vertically and horizotally.
    Hope I completed the script by 90%
    Completed Script:
    var myGraphics = app.activeDocument.allGraphics;
    var targetResolution = 300;
    for (var i = 0; i < myGraphics.length; i++) {
        try
        if (myGraphics[i].effectivePpi[0] < 300) {
            var myPPI = myGraphics[i].effectivePpi[0] + " dpi"             //please ensure this line should be correct
            var myName = myGraphics[i].itemLink.name;
            var myPage = myGraphics[i].parentPage;
            var myCaption = myPage.textFrames.add();
            myCaption.textFramePreferences.verticalJustification = VerticalJustification.TOP_ALIGN;
            myCaption.contents = "FPO\r" + myName + "\r" + "Low Res " + myPPI;
            var bnds = myGraphics[i].parent.visibleBounds;
            myCaption.visibleBounds = [bnds[2] + 3, bnds[1], bnds[2] + 6, bnds[3]];
            myCaption.fit(FitOptions.FRAME_TO_CONTENT);
            try {
                var myPStyle = app.activeDocument.paragraphStyles.add({name: "Caption_lowres", justification: Justification.CENTER_ALIGN});
            } catch (myError) {
                  myCaption.parentStory.appliedParagraphStyle = app.activeDocument.paragraphStyles.item("Caption_lowres");
            myPage.groups.add([myCaption, myGraphics[i].parent]);
    catch(myError)
    REQUIRED OUTPUT
    But Current Output using above script
    Thanks
    Beginner_X

    Hi Mr.Dave,
    Thank you for your response...
    I trying your code but I am not able to get the output.
    Could you help to get the output for me.
    var myGraphics = app.activeDocument.allGraphics;
    var targetResolution = 300;
    for (var i = 0; i < myGraphics.length; i++) {
        try
        if (myGraphics[i].effectivePpi[0] < 300) {
           var myPPI = myGraphics[i].effectivePpi[0] + " dpi"
            var myName = myGraphics[i].itemLink.name;
            var myPage = myGraphics[i].parentPage;
            var myCaption = myPage.textFrames.add();
            myCaption.textFramePreferences.verticalJustification = VerticalJustification.TOP_ALIGN;
            myCaption.contents = "FPO\r" + myName + "\r" + "Low Res " + myPPI;
            var bnds = myGraphics[i].parent.visibleBounds;
            myCaption.visibleBounds = [bnds[2] + 3, bnds[1], bnds[2] + 6, bnds[3]];
            var center = {x : (bnds[1] + bnds[3])/2, y : (bnds[0] + bnds[2])/2}
            var capCenter = {x : (capbnds[1] + capbnds[3])/2, y : (capbnds[0] + capbnds[2])/2}
            myCaption.move(undefined, [center.x - capCenter.x, center.y - capCenter.y]);
             myCaption.fit(FitOptions.FRAME_TO_CONTENT);
            try {
                var myPStyle = app.activeDocument.paragraphStyles.add({name: "Caption_lowres", justification: Justification.CENTER_ALIGN});
            } catch (myError) {
                  myCaption.parentStory.appliedParagraphStyle = app.activeDocument.paragraphStyles.item("Caption_lowres");
            myPage.groups.add([myCaption, myGraphics[i].parent]);
    catch(myError)
    Help me to get output as per attached screenshot
    Thanks
    Beginner

  • International - Can't find previous region

    International - Can't find previous region
    Hello there,
    I changed the region at System Preferences>International>Formats by mistake and now I can't find the previous location.
    The previous one was set to "Argentina (English)" and now I can only find "Argentina (Spanish)"... This changes some preferences that I would like to have as before....
    Any ideas?
    Thank you!!
    Julieta
    PowerMac G5 Dual, 1.8ghz   Mac OS X (10.4.4)  

    Hi Armeen, thanks for your response.
    No, before the currency (yes, under the formats tab) there are other options:
    Region
    Dates
    Times
    Numbers
    Well, I changed the region by mistake, (it used to say "Argentina (English)") and when I wanted to put that back I only found "Argentina (Spanish)" which changes the Dates, Times & Numbers format.
    Hope this is clear, english is not my language.
    Thank you.
    Julieta

  • Find text and replace with image - Help needed

    Hi,<br /><br />We need to place the images as inline in the appropriate places.<br /><br />texttexttext<<test1.eps>>texttexttexttexttexttext<<test2.eps>>texttexttexttexttexttext< <test3.eps>>texttexttexttexttexttext<<test4.eps>>texttexttexttexttexttext<<test5.eps>>text texttext<br /><br />This code is helpful for placing a single image at a time, we are unable to place all the images in one shot, can anyone help me out.<br /><br />I am not a programmer.<br /><br />-----------<br />var myDoc = app.activeDocument; <br />app.findPreferences = app.changePreferences = null; <br />var math=document.search("test.eps"); <br />for (i=math.length-1; i >=0; i--)<br />{ myDir = Folder.selectDialog(); <br />AllGraphics = Folder(myDir).getFiles('test.eps') <br />for (i=0; i<math.length; i++) { app.select(anil1[i]); <br />     myDoc.place(AllGraphics[i],false); } }<br />-----------<br /><br />Note: I have taken this code from forum and we have made some changes on this.<br /><br />Kavya

    Jongware,<br /><br />I try running it but gives errors:<br /><br />Error Number: 55<br />Error String: Object does not support the property or method 'changePreferences'<br />Line: 24<br />Source: app.findPreferences = app.changePreferences = null;<br /><br />This is the code I used<br /><br />// Find text and replace with image for InDesign CS3 <br />// http://www.adobeforums.com/webx?128@@.3bbf275d.59b6f012<br />var heyItsAnArray = new Array ( <br /><br />   "it contains this line!", <br /><br />   "as well as this one", <br /><br />   "or even more!", <br /><br />   "test.eps" ); <br /><br />for (arrayCount=0; arrayCount<heyItsAnArray.length; arrayCount++) <br /><br />{ <br /><br />   replaceImg (heyItsAnArray[arrayCount]); <br /><br /> } <br /><br />function replaceImg (name) <br /><br />{ var myDoc = app.activeDocument;  <br />     app.findPreferences = app.changePreferences = null;  <br />     var math=document.search(name); <br />     for (i=math.length-1; i >=0; i--)  <br />     { myDir = Folder.selectDialog();  <br />          AllGraphics = Folder(myDir).getFiles(name)  <br />          for (i=0; i<math.length; i++) { app.select(anil1[i]); <br />               myDoc.place(AllGraphics[i],false); <br /><br />               } <br /><br />          } <br /><br />     }<br /><br />Michael

  • Applying blur to a region of a image

    Hi,
    how do I apply a blur effect to a region of a image/bitmap.
    Lets say I have one big image 1024x768 and i want to apply a blur effect to a region of x100 y100 width100 height100.
    Any hint please
    Marc

    Hi,
    You can always take a snapshot of the area behind your thingy and apply it as the thingy's  blurred background(this also can work with dragging the thingy around). 
    David.
    ps: I assume thingy is the technical term for 'object placed above area requiring an effect'  .

Maybe you are looking for

  • Remove null values from string array

    Hi , I have a string array in a jsp page which I save some values inside. After I store the values I want to print only those who are not null. How can I do this? Is there a way to delete the null values?

  • [SOLVED].xinitrc - some entries doesn't work

    Hey. There are problems with my .xinitrc. I tried to turn off the DPMS with it (configuring xorg.conf never changed the behaviour of dpms) by inserting the line "xset s off && xset -dpms". But it just doesn't do what I expecting from it, DPMS is stil

  • Idoc error 29 - Error in ALE service

    Hi All, I have this error 29 - Error in ALE service when the idoc is created (No global company code is assigned to the company code). This message comes after 01 - IDoc created Any idea why this is happening? I have created conversion rule to conver

  • Gradient not drawn correctly in JRC 12.2.212

    Hello, I have JRC version 12.2.212 installed in the application, but when I try to generate from Java a rpt with a pie with color gradients, the result is a black rectangle being drawn behind the pie (and over some slices) Link for the image : http:/

  • Reports: Additional Image in  a Colunm

    Hi all, A report retrieves it's Query from a PL/SQL Function. The report merges some Ruled address data together with some individual address data, criteria are retrieved from the same page call. The first report column contains APEX_ITEM.CHECKBOX on