Changing colors of an image in real time

Hi,
I am trying to get an image raw data in an int[] array using getRGB() in order to change the color of the image.
But it is working fine in simulator for any image. if i install it in real device say Nokia 6600 the getRGB() method is not working for large .png image like size (88X57) because the device gets hang while we are using large image but it is working fine for small image.
Pls give me some idea how to use getRGB() for large image.
Following is the sample code
int imageWidth = img.getWidth(); 
int imageHeight = img.getHeight();
int[] raw = new int[imageWidth*imageHeight];
img.getRGB(raw, 0, imageWidth, 0, 0, imageWidth, imageHeight);Thanks in advance

Use the AI CONFIG to set up your acquisition.
Use AI CLOCK config to set up your timing.
Use AI TRIGGER CONFIG to set up your trigger.
Use AI CONTROL to start the DAQ (use TOTAL SCANS TO ACQUIRE = 0 for unlimited scanning.
repeat (While loop)
Use AI READ with a NUMBER of SCANS TO READ = 0. This tells you the backlog (how many scans in the buffer)
Use AI READ with NUMBER OF SCANS TO READ = to the backlog number from above. (this empties the buffer)
Process the scans received into your image - append to previous data and re-display.
If you are doing a fixed number of scans, add this backlog number to the total done so far, and see if you're done. If you're doing continuous, skip this step.
Wait 100 mSec if you can, 10 m
Sec if you can't.
Loop (until # scans done >= # scans wanted OR Quit button, whatever).
Use AI CONTROL to stop the DAQ.
The idea is that the DAQ operation happens in the background. You just ask how many are available, and then read that many and use them.
You wait 100 mSec to allow the display update to happen.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks

Similar Messages

  • How to change color of a button for specific time interval in jsp

    How to change color of a button for specific time interval in jsp.
    Please help.
    Thanks in advance.

    This was driving me crazy, too--and the previous answers did not seem to work. I eventually found that if I click one of the data symbols in the graph in exactly the right spot (see below), it selects only the data symbols and not the line. I can tell this because the little selection dots will be around each data symbol, but no selection dots will be on the line between the data symbols - like the graphic in Yvan's answer. Then and only then will the color symbol in the tool bar show the color of the data symbol, instead of the color of the line. I believe that you then have to first click on the color swatch in the toolbar and then select your color (or choose Show Colors and select from the color tool). Just clicking a color in the crayon box, for example, did not seem to work unless I first clicked on the color swatch in the toolbar, then clicked Show Colors on that dropdown, and +only then+ clicked the crayon or whatever.
    _The right spot to click_ seems to be just above the exact center of the data symbol, at least for the diamond shape symbol that I prefer. Sometimes it takes several tries to hit the right spot. If I miss it, the whole line is selected, which is indicated by the little selection dots on the line, between the data symbols. When I click the right spot, those selection dots go away, leaving only the data symbols selected. Then I can change the color, as described above.
    I hope this works for you too.

  • Change colors of interactive image controls

    Hello,
    I seem to be having a problem with the interactive image widget in iBooks author. In the software, and under the template I'm working with, i added some interactive image widgetsvwith always-on controls. Now the controls niceley integrate wth the template by adopting a light blue color.
    However, when i preview the book on my iPad, the controls are dispayed in black which is, in my opinion, much uglier thannblue for this specific template, do you know how this csn be changed ?
    Thank you

    I suspect this repsonse is somewhat mis-leading, the code has no effect on the control other than setting its state, although the route is somewhat tedious for the mod.
    I would imagine that the control is set up so that the pixels didn't move around when they are being used as controls.
    There are nested groups and locks on the controls, which might make the ordering in the cluster easier to manage.
    The following should work....... ;-) it did for me
    Open  your own new VI
    Open the main LCD VI
    Open the Browse VI Hierachy
    Drag and drop the LCD VI onto your own diagram
    Create a cluster from the LCD VI's connector
    Now ungroup the clusters and unlock them (this is tedious) if you create your own then you could be more imaginative in the structure, I leave that for homework.
    Then import a new bitmap (gif) into the control
    Now update the modified contol back into the master control
    ........ Told you it could be done, but I am not sure the pain was worth it.
    BUT
    Try the alternative control..... with colour settings as well, ANY colour and even some size control.
    It was here http://members.lycos.co.uk/sgctek/

  • Changing color of Interactive Image label?

    i'm pretty clear on how to alter the title, caption, border of an Interactive Image, but i'm wondering if there is a way to change the color, orientation and appearance (other than font) for the associated labels? any help would be great. thanks!

    fabe: i totally get that -- and you're right -- a good designer would understand that the labels shouldn't upstage the graphic to which they refer. to that end, i think that effect would be enhanced if you looked at the default screen and simply saw (unboxed) labels, and then when you clicked opn the text, you'd zoom in and the text might even get a little transparent so the graphic is even more accentuated. i also think it would be cool if you could control the default view of the label (change it's colors, characteristics, transparency, etc) and then when setting its zoomed-in view, you'd also be able to change the label's colors, characteristics, transparency, etc, as well. honestly, i'm sort of relieved to know this isn't possible in ibooks author 1.0 (maybe in 2.0?) because i looked and looked AND looked. btw, the app is INCREBIBLY intuitive -- pretty **** remarkable, in fact. you have done an amazing job, so thanks so much! bob (ps: so glad i waited for a great wysiwyg ibook tool -- and that apple released it. i plan in converting a number of my out-of-print books -- and will be using ibooks author!) http://www.bobstaake.com/page5.shtml)

  • Cannot change color of png image in AI

    I downloaded a camera png image (http://simpleicon.com/camera.html) and am trying to change its color to red (B03B28). But the fill box is not working. It shows like the item is red but it will not change. Can the color be changed?

    go back to the download site and get the .svg file--that will open in Illustrator and you can change the color--the only way to change the color with the .png file is in photoshop

  • Changing colors on an image

    hi,
    I have a black and white image. Now I want to change all black dots into a different color. What is the best way to do that?
    thanx,
    Usul

    One solution is to use the ColorConvertOp class.
    Another is to run through the rgb data manually and reset black pixels to the color you want.

  • Change color of entire image?

    I have a damask flourish design in JPEG format.  I want to change the entire color of the design from green to pink.  How can I do that?  I have an older version of Photoshop Elements 6.0 on my Windows XP machine, but can upgrade to 11 on my Macbook Pro.  Any help or advice is appreciated.  Thanks.

  • Changing colors in an Image object

    I have an Image objects and want all the red pixels in it changed to blue during runtime.
    How can I do that?

    ImageIcon oldImage = new ImageIcon("C:\\duke\\t1.gif");
    ImageProducer producer = new FilteredImageSource(oldImage.getImage().getSource(),new MyFilter());
    ImageIcon newImage = new ImageIcon(Toolkit.getDefaultToolkit().createImage(producer));
    JLabel jl = new JLabel(newImage);
    // Image filter
    class MyFilter extends RGBImageFilter{
      public int filterRGB(int x, int y, int rgb) {
        int alpha = (rgb >> 24) & 0xff;
        int red = (rgb >> 16) & 0xff;
        int green = (rgb >> 8) & 0xff;
        int blue = rgb & 0xff + red;
        if (blue>255) blue=255;
        red=0;
        return alpha << 24 | red << 16 | green << 8 | blue << 0;
    }

  • Real time importing images

    I am working on the project that I need to import images in real time. I mean my program have to get a picture per second.I am very new with LabView and don't know how can I do that. can anyone help me please?
    Thank you in advance.

    zeinab1 wrote:
    There is usb camera and I mean by real time is really fast like one picture per second.  I am good at programing but no experience with LabView. Do you think can I code separately in C or C++ and kind of using in LabView.
    I have a USB camera mounted on my monitor "looking at me".  I fired up MAX and tried to determine how quickly I could "snap" (take a single image) pictures.  Since I was manually "pushing the button", it was tricky to tell, but it seemed to be possible to take 1/sec.  I then tried "grab", which takes videos -- this was (of course) much easier, and considerably faster (I'd guess tens of frames/second).
    I have the Vision module installed, and am using IMAQdx for getting the images.  LabVIEW isn't bad in capturing images, but there's not a lot of hand-holding or extensive documentation -- I think it could be a real challenge to "do it yourself" with no LabVIEW experience.
    To even see if this is a viable approach for you, see if you can repeat what I did -- plug in your USB camera, open NI-MAX, and see if the camera shows up.  If it doesn't, stop -- you don't have the LabVIEW software appropriate to do this installed.
    BS

  • How to desaturate (or color edit) an IMAGE?

    I have an image imported to Illustrator. Some of JPG files. Now I want to add to my image desaturation 100%.
    Scale of gray, you know what I mean.
    But I didn't see an option to edit that image.
    When I click this: http://prntscr.com/5kpc43 what means "Edit original", my image opens in... Microsoft Paint!
    There must be any option to do that in Illustrator. I can't do this in Photoshop because I would have to do all things from the beginning (scale, rotation, position etc).
    Please, help

    Thanks to everyone for trying to help me.
    1. My pictures are opened by graphics explorers, like IrfanView or standard Microsoft Browser. So I can't do that. Because I don't want after that opening my Image files in Photoshop, no. I want to just edit it one time. I think Illustrator should open my image in Photoshop automatically when I select my image in Illustrator and click "edit image", don't you think?
    2. I work mostly on Corel Draw. It'a also vector software but there we can change color of rasterized images.
    3. Hey, there must be a way to do that in Illustrator. C'mon, this is not a very heavy, complicated thing to do with rasterized image. I want only to DESATURATE it, that's all. I don't beliewe that default Illustrator can't do that simple thing.
    4. Color editing isn't work:
    5. The most important. I know that I can do it all over again but I place my object in "create clipping mask". And put this very carefully etc. So I want just edit a color (desaturate a little bit). Instead I would have to delete this, desaturate in Photoshop, paste this in Illustrator, then create a clipping mask again etc. And after that I think "hmmm, maybe desaturation is a little to much, let's see how it looks like next time" and I will have to do this all over again! No way, there must be option to do this SIMPLE action in Illustrator without aby plugins.

  • Best practice for real time requierement

    All,
    I am trying to find out what is the best practice for reporting against real time data ?
    is it while using
    1 - webi against universe/bex query on the top of hybrid cubes ?
    2 - Crystal report directly against the ECC data ?
    3 - using another solution such as Data Fedrator ? or something different ?
    I am looking to know if anyone got such req and also to share their experience 
    did they get some huge challenge against hybrid cubes ?
    Thanks in advance for your help
    Philippe

    Well their first requierement was to get real time data .. if i am in Xcelsius and click refresh then i want it to load my last data ..
    with live office , i can either schedule a crystal report and get the data delayed or use the option from live office to make iterfresh as right now .. is that a correct assumption ?
    I was talking about BW, just in case they are willing to change the requierement to go from Real time to every 5 min
    Just you know we are also thinking of the following option:
    1 - modify the virtual provider on the  CRM machine to get all the custom fields needed for the Xcelsius Dashboard
    2 - Build some interactive report on the top of these Virtual Provider within CRM
    3 - get the link to this report , it is one of the Report feature within CRM
    4 - design and build your dashboard on the top of it
    5 - EXport your swf file to the cRM web ui
    we are trying to see which one is the best one
    Philippe

  • Best configutation for Real Time : What you've experienced...

    Hi.
    I've a Blackmagic/G5 2x2,66 dual Core Xeon/8GB RAM/RAID HDDs, and I'v got a 6/7 fps playback for DVCPro HD footages...
    I'd like to know the best config you've experienced for approaching real time treatment in DVCproHD format...
    thanks !

    Well their first requierement was to get real time data .. if i am in Xcelsius and click refresh then i want it to load my last data ..
    with live office , i can either schedule a crystal report and get the data delayed or use the option from live office to make iterfresh as right now .. is that a correct assumption ?
    I was talking about BW, just in case they are willing to change the requierement to go from Real time to every 5 min
    Just you know we are also thinking of the following option:
    1 - modify the virtual provider on the  CRM machine to get all the custom fields needed for the Xcelsius Dashboard
    2 - Build some interactive report on the top of these Virtual Provider within CRM
    3 - get the link to this report , it is one of the Report feature within CRM
    4 - design and build your dashboard on the top of it
    5 - EXport your swf file to the cRM web ui
    we are trying to see which one is the best one
    Philippe

  • About DTP with real-time access.

    Hello Gurus,
           setting for error handling only has an impact while repairing a DTP request (repair) and during the conversion of the DTP to standard DTP (for example, to correct an error during extraction).
          will you please give a simpel scenario to explain above words?
    thank you very much.
    Fran

    Hi,
    Use :
    With SAP NetWeaver 7.0, SPS 14, the following changes and enhancements are available for real-time data acquisition:
    ●      Changes to the menu and the context menu of the monitor for real-time data acquisition
    The menu and the context menus for the individual objects in the monitor for real-time data acquisition have been standardized and enhanced. In particular, it is now possible to assign daemons and data transfer processes on various levels using context menu entries. For a complete overview of the functions in the menu and in the context menus, see Monitor for Real-Time Data Acquisition.
    ●      Assignment of daemons for InfoPackages and data transfer processes (DTP)
    To assign InfoPackages and data transfer processes to a daemon, you can call the monitor for real-time data acquisition in the following ways:
    ○       In the Data Warehousing Workbench using the respective context menu entry Assign RDA Daemon.
    ○       In InfoPackage maintenance using the Schedule tab page, and in data transfer process maintenance using the Execute tab page.
    The button names for jumping to the monitor for real-time data acquisition have changed here. To jump to the monitor, choose Assign Daemon.
    ●      Repair process chains for repairing a broken data transfer or a missing delta in the DataStore object
    In certain situations, a gap in the delta of the DataStore object can occur if there is a closed request in the PSA but there is no corresponding request in the DataStore object. For example, this is the case if a DTP request has terminated due to an error in the transformation. Here, you can create a repair process chain to repair a missing or broken update from the PSA. The repair process chain contains a standard DTP as well as any further processes required for subsequent processing (such as activating the data in the DataStore object or subsequent process chains). When the repair process chain is executed, the complete delta is loaded from the source into the DataStore object and processes for activation and further processing are executed if required.
    ●      Process types for starting and stopping real-time data acquisition
    You can use process chains to control real-time data acquisition using process types Start Real-Time Data Acquisition (RDA) Load Process and Stop Real-Time Data Acquisition (RDA) Load Process.
    More Info :
    http://help.sap.com/saphelp_nw70/helpdata/en/47/2731751c2a2dede10000000a1553f7/frameset.htm
    Regards
    Ram.

  • Change color label .setStyle

    hi anyone knows personnel, such as changing color of the label at run time and return to original color
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
               <mx:Panel id="panel" width="469" height="415"  headerHeight="90" layout="absolute" horizontalCenter="27" verticalCenter="-10">
                   <mx:Button 
                             id="button"  click="{effect()}" x="10" y="208" width="122"
                   </mx:Button>
                   <mx:Label id="inform" x="140" y="100.8"  width="86" />
               </mx:Panel>
        <mx:Script>
            <![CDATA[
                public function effect():void
                   // I go to red
                    inform.text="test!".setStyle("color", 0xff0000);
                   glowImage.play();
                   //after the end return to the blue
                   inform.setStyle.setStyle("color", "Blue");
                ]]>
        </mx:Script>
            <mx:Glow id="glowImage" duration="1000"
                        alphaFrom="1.0" alphaTo="0.3"
                        blurXFrom="0.0" blurXTo="50.0"
                        blurYFrom="0.0" blurYTo="50.0"
                        color="0x00FF00" target="{inform}"/>
    </mx:Application>

    If this post answers your question or helps, please mark it as such.
    I have to ask what you are trying to do, because this is an interesting use of an effect.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      layout="absolute">
      <mx:Panel id="panel" width="469" height="415" 
        headerHeight="90" layout="absolute" horizontalCenter="27"
        verticalCenter="-10">
        <mx:Button id="button"  click="effect();"
          x="10" y="208" width="122"/>
        <mx:Label id="inform" x="140" y="100.8"  width="86" />
      </mx:Panel>
      <mx:Script>
        <![CDATA[
          public function effect():void{
            inform.text="test!";
            glowImage.play();
        ]]>
      </mx:Script>
      <mx:Glow id="glowImage" duration="1000" alphaFrom="1.0"
        alphaTo="0.3" blurXFrom="0.0" blurXTo="50.0"
        blurYFrom="0.0" blurYTo="50.0"
        color="0x00FF00" target="{inform}"
        effectStart="inform.setStyle('color', 0xff0000);"
        effectEnd="inform.setStyle.('color', 0x0000ff);" />
    </mx:Application>

  • 10 band real time equalizer from mic to earphones

    Hi. I would like to do script to do 10 band equalizer which would change sound from microphone dynamicly (in real time) and result play in earphones (also realtime) with small time lag.
    Is that possible? Maybe some paid library? I would like to get 15 band EQ.
    I found something like this:
    http://www.blixtsystems.com/2008/05/simple-3-band-eq-with-flash-player-10/
    but i don`t know how to scale it to get 10 or 15 bands.
    Would it work on mobile air apps or only on desktop & flash apps?

    I found something like this:
    http://philippseifried.com/blog/2011/10/20/dynamic-audio-in-as3-part-3-robot-voice/
    I would like to change it get EQ band corrector to set some bands (f.e. 10 different frequences in hearing range from 125Hz to 8000Hz) volume level up anddown. 
    Something like this:
    band125hz.volume +=1;
    band200hz.volume +=5;
    band400hz.volume +=0;
    band800hz.volume +=1;
    I would like volume up and down by frequencies. This script after change should strengthen (boost) or weaken (cut) the energy of specific frequency bands as in this process:
    http://en.wikipedia.org/wiki/Equalization

Maybe you are looking for

  • 1 Admin console to manage OSB and SOA installed on different servers

    Dear All, We are planning to have OSB installed on Host 1 and SOA server installed on Host 2. But there will be one Admin console to manage these 2 for the ease of maintenance. When i was trying to install this configuration I had few issues. Hope SO

  • Itunes encounters an error and needs to close when I try to add music

    I just bought a brand new laptop and installed a fresh brand new itunes onto it, but every time I try to add my music, it encounters an error and closes. I uninstalled it, restarted the computer and reinstalled and everything, and it happens every ti

  • Date changes in SO to PO.

    Hello, To all SDN Contributors, Query: Using with reference of Purchase order creating sales order. here the purchase order is raised the dated : 01-09-2008 and the sales order is generated dated : 08-09-2008. but here is it possible the sales order

  • Enhancement methods

    Dear Experts, Iam hust going through a SAP  Book .in that it is written that there are in two ways we can do enhancement. 1. by Enhancement(Append Structure) 2. by modification    create a view or an ABAP query infoset and overwrite the extractor for

  • Can't download photos from facebook to iphone there is any setting that i have to change ?

    i am new using apple tech so please help also there is any stting for the face time ? i wantthe icon on the screen but iphone doesnt show it like the ipad