Which is the best way to compare images?

hi all,
My question is that if i want to compare two images in midp2.0 and obtain perceptual diff. between those two images,then what should i do?where to start with?pixel-by-pixel comparison or any othere approach i should use?please guide me through this.

hi gnat,
finaly i have thought a approach just tell me that how efficient it will be,
Say We Have To images,among which first is a base image and the other image is an image to which we are comparing our base image.
1.first of all i am gointg to obtain Red,green,blue And alpha values for both image using getRGB() function and then store those values in integer arrays.
2.after doing this i am going to buil a compar() function,in which
say,r1 is the array of red values for all pixels in image1(baseimage) and r2 is the array of red values for all pixels in image2.
so what i m going to do in compare() function is substract each values of r1 from each values of r2,(r1-r2).
and assign a percentage based on the difference (r1-r2).and do the same for green values and blue values.so is it ok or not?

Similar Messages

  • What is the best way to display image ??

    hi my questions is unusual, there are so many ways to display images.
    I m developing image processing s/w can any one suggest me which would be the best way to display image on which i can perform image operations.
    like in JPanel, icon, trhough paint() or anything else...
    thank you..In advance

    hi man... i think so imaging is better with JAI(Java Advanced Imaging) .... is perfect for display in jcomponent like JPanel or JLabel, you have to replace the paintComponent().
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Rectangle;
    import java.awt.geom.AffineTransform;
    import javax.media.jai.PlanarImage;
    import javax.swing.JComponent;
    class ImagePanel extends JComponent {
         protected PlanarImage image1;
         protected AffineTransform atx= new AffineTransform();
         protected int width, heigth;
         public ImagePanel() {
         public ImagePanel(PlanarImage i) {
              image1= i;
              width= i.getWidth();
              heigth= i.getHeight();
         public void paintComponent(Graphics gc) {
              Graphics2D g= (Graphics2D)gc;
              Rectangle rect= this.getBounds();
              if ((width != rect.width) || (heigth != rect.height)) {
                   double magx= rect.width / (double)width;
                   double magy= rect.height / (double)heigth;
                   atx.setToScale(magx, magy);
              if (image1 != null)
                   g.drawRenderedImage(image1, atx);
    if you need more info, ask about JAI api and docs

  • Which is the Best way to upload BP for 3+ million records??

    Hello Gurus,
                       we have 3+million records of data to be uploaded in to CRM coming from Informatica. which is the best way to upload the data in to CRM, which takes less time consumption and easy. Please help me.
    Thanks,
    Naresh.

    do with bapi BAPI_BUPA_FS_CREATE_FROM_DATA2

  • What is the best way to place image (with caption) in a Book?

    I am preparing a template for an Encyclopedia project, The Encyclopedia will be in more than 10000 pages, so what is the best way to place images (Photos, Graphs, illustration ...etc) with a caption?
    The problem that when I modify text; the image don’t move with it, and when I place it within the text, it's difficult to control text flow.
    Please Help

    Thank you Peter,
    it's a bit dificult to control anchored object -speacially in two colum text box- when placing image in one and half colum size, it wont move to first column.

  • Which is the best way for posting a large number of records?

    I have around 12000 register to commit to dababase.
    Which is the best way for doing it?
    What depends on ?
    Nowadays I can't commit such a large number of register..The dabatase seems hanged!!!
    Thanks in advance

    Xavi wrote:
    Nowadays I can't commit such a large number of registerIt should be possible to insert tens of thousands of rows in a few seconds using an insert statement even with a complex query such as the all_objects view, and commit at the end.
    SQL> create table t as select * from all_objects where 0 = 1;
    Table created.
    Elapsed: 00:00:00.03
    SQL> insert into t select * from all_objects;
    32151 rows created.
    Elapsed: 00:00:09.01
    SQL> commit;
    Commit complete.
    Elapsed: 00:00:00.00
    I meant RECORDS instead of REGISTERS.Maybe that is where you are going wrong, records are for putting on turntables.

  • Which is the best way of deploying JSP (mod_ose or OSE) ?

    I need to deploy some jsps that are using servlet api 2.2 and i would like to know which is the best way of deploying these jsps?
    Thanks
    RJC

    Speaking of JServ Vs OSE, I have some related questions on it. I would appreciate if someone can answer:
    1.For a stateful servlet (assuming that we are using Oracle JVM), Will it not call the init() method of the servlet each time for a client (because each client will have his own Oracle JVM)? If so, isn't that expensive because it needs to initialize the servlet again?
    Again, for the same servlet, Will it not have a servlet context for each and every client? Isn't that expensive? ( A servlet context by definition maintains state information for all instances of a web application within any single JVM)
    2. If we have an application that has some portion of it which is stateless and some portion of it which is stateful, how do we make a choice JDK JVM vs Oracle JVM?
    Can we (for the same application) use both the JDK JVM as well as Oracle JVM? If so, how does the JDK JVM talk with Oracle JVM?
    3. Since Oracle JVM is useful for stateful applications only, does it mean that we cannot use it for Stateless session beans? (In an application we might have stateless session beans, stateful session beans as well as entity beans) Should we be using JDK JVM or Oracle JVM?
    4. For Servlets too, we might have stateless servlets and stateful servlets within the same application. If so, can we use JDK JVM for stateless servlets and Oracle JVM for stateful servlets? If so, how does the JDK JVM talk with Oracle JVM?

  • Which is the best way for a called function to identify caller class name.

    Which is the best way for a called function to identify the caller class name .
    1)Using sun.reflect.Reflection from called function
                    Class caller = Reflection.getCallerClass(2);
                    System.out.println("Caller Class Name ::"+caller.getName());2) Analyzing current threads stack trace from called function
                    StackTraceElement[] stElements=Thread.currentThread().getStackTrace();
                    System.out.println("Caller Class Name ::"+stElements[3].getClassName());Is there any alternate ways to achieve the same .Which is the best way ?
    Called function doesn’t have any arguments, I don’t want t pass any arguments from caller function to called function.
    Plz help.
    With kind regards
    Paul

    798185 wrote:
    Which is the best way for a called function to identify the caller class name .
    Is there any alternate ways to achieve the same.SecurityManager
        // 0 is the anonymous SecurityManager class
        // 1 is this class (also works in static context)
        // 2 is calling class
        static Class getClass(int i) {
            return new SecurityManager() {
                protected Class[] getClassContext() {
                    return super.getClassContext();
            }.getClassContext();

  • Filter or Restrict on? Which is the best way to put it?

    Hello Experts,
    If there is a Characteristic/Key figure on a report in BEx, and I right click on it and find another data element say, 0FISPER it I EDIT. On right click on 0FISPER I a variable.
    My question is this, do we way that the key figure is RESTRICTED ON 0FISPER
    or, key figure is FILTERED by 0FISPER
    When do we use Filter or Restrict on? Which is the best way to put it? How best is it read, please include the variable in your discussion.
    I will appreciate this clarification.
    e.g. Company code EDIT shows Company codes ZPPTcomp: with nodes  8000, 9000
    Thanks.

    Hi Amanda,
    as per my understanding,
    you are checking the structure field, you have selected edit then you are viewing a key figure and 0fiscper restricted by varaible. am I right?
    if this is the case this is local selection and the key figure is restricted by fiscper variable means the restriction value user can enter in selection screen. if you select 0fiscper and select restrict there you can see single values, value range and you can also see varaible tab. by using varaible tab you can restrict to variable value.
    hope this gives you some understanding.
    Sathya

  • Which is the best way to create a connection object

    hi,
    Eventhough i am not new to java I just wanted to know that which is the best way for creating sql connection object.
    Is it using the DriverManager.getConnection(..,..,..) or using a datasource and getting the connection.
    Which is more efficient or Is there any other way to create sql connection which is even more better.
    thanks in advance.
    pradeepbhargav

    AFAIK all connections, DataSource ones included are created by calling the DriverManager. A DataSource is a factory for Connection objects (from JavaDocs)
    If you're talking about managing connections then it depends on the application. A DataSource is great for apps that can support many clients or are multi-threaded, but may require a JNDI implementation to get to it.
    If however you have an single threaded app that hits the database in a serial fashion, then DataSource is probably an overkill.
    Dave

  • I am currently running my mac booc pro with the osx 10.5.8 and i want to update it. Which is the best way?

    I am currently running my mac booc pro with the osx 10.5.8 and i want to update it. Which is the best way?

      Snow Leopard Purchase
    Computer Compatibility - Lion
    Mountain Lion/Mavericks
    Check that your computer is compatible with Mountain Lion/Mavericks.
    To check the model number hold down the option/alt key, go to the Apple menu and select System Information.
    MacBook Pro (Mid/Late 2007 or newer) model number 3,1 or higher
    Your Mac needs:
    OS X v10.6.8 or OS X Lion already installed
    2 GB or more of memory (More is better - 4 GB minimum seems to be the consensus)
    8 GB or more of available space

  • What is the best way to preview Images

    I'm trying to figure out if Lightroom is the best software for the first part of my workflow and if so, how to do it.
    When I import images, I copy them to my hard drive and at the same time to my backup drive. Before doing that, I want a good preview of the images and get rid of garbage that I don't even want to back up.
    To do anything with images in LR, you have to import them first. Since I shoot in Raw, I'm limited in my choice for viewing the images first. Sometimes, I will start Bridge and use my normal rating system on the cards and delete garbage before importing into LR. My problem with this is that Bridge is slow and the reason I moved to LR in the beginning, Also, I'd rather keep my workflow within as few pieces of software as possible. (My opinion is that LR should come with CS and demote Briidge to Elements, but that's a different thread.
    I'm looking at another software for sorting and rating, but again, this is more expense and overhead on something LR should be able to do.
    Anyway, I am looking for the best way to get this done in LR, or alternatives that others are using.
    Thanks

    The much maligned import module in the LR3 beta will do what you want.  You can view the images on your card in loupe view and decide which ones to import.  It is not grease lightning, but not bad on my PC.
    Rory

  • Which is the best way to parse nested XML

    Hello, I am just getting back into using ColdFusion and I am
    working on a project that needs to parse some XML.
    The XML is generated by a third party document.
    I figured out how to grab individual values and such, but I'm
    not sure what is the best way to grab a value in relation to where
    it is in the XML.
    Following is a rather simplified example of the XML
    I need to grab the value of 'Rich Text' in relation to the
    'ID name' value.
    <project>
    <CT text>
    <Group>
    <id name = text1>
    <Rich Text>some sample text</Rich
    Text>
    </id>
    </Group>
    </CT Text>
    <CT text>
    <Group>
    <Group>
    <id name = text1>
    <Rich Text>some sample text</Rich
    Text>
    </id>
    </Group>
    </Group>
    </CT Text>
    <CT text>
    <id name = text2>
    <Rich Text>some more sample text</Rich
    Text>
    </id>
    </CT Text>
    </project>
    Once parsed, the info I need to output on the page would look
    like
    text 1
    some sample text
    text 2
    some more sample text
    The part that makes this difficult for me is that there may
    be 0 'Group' values or there might be a number of them. As such, I
    can't just grab the value by listing the tree out, since it changes
    depending on the document (there are thousands of these documents
    that I need to parse).
    From what I have seen in some XML examples, there are a
    number of ways to go about doing this, but before I put a lot of
    time into any of them, I was wondering what the 'best' way to do
    this is.
    XSLT? XMLSearch? Structures? Some combination of those or
    other functions?
    P.S. what little I know of using ColdFusion with XML all
    comes from the doc written by Nate Weiss.
    I was a bit let down that after spending well over $1,000 for
    ColdFusion, Adobe left out the only two books that were worth
    printing (the CFML reference guide and the Advanced book). It
    wouldn't have bothered me as much if there was something on the
    product page listing the manuals that said 'we only actually give
    you 2 of the ones listed'.
    Best regards
    Kevin R.

    Hello,
    Could someone do me a huge favor and provide some sample code
    that would parse/output the above xml so that the output would look
    something like the following. . .
    text 1 = some sample text
    text 2 = some more sample text
    The problem I am having is displaying the xmltext for the
    RICH TEXT element in relation to the ID element.
    The code below will return the value of the RICHTEXT
    (incorrectly named in the original XML examples) easily enough, but
    I need to have it show which text number it is.
    Best regards,
    Kevin R.

  • What is the best way to view images on an External Hard Drive?

    I have a Macbook Pro with the latest OS X Yosemite
    Can anyone tell me the best way to easily view thumbnail images on the external hard drive because at present I am having to open each folder and would ideally like to see all thumbnail images in similarity to what Adobe Bridge has! (I have not got Adobe Bridge).
    Any pointers or advice please?
    Ta

    I backup regularly to data DVD's without a problem.

  • Whats the best way of storring images

    I have an application that will handle images for the elements of a catalog. The application will not have a very heavy load, will be for managament use only, and the database and the app server will be on the same machine.
    I am investigating what is the best way of storing these images, if i keep them in the database or in the server as files.
    With best way i mean perfomance and quick response.
    Whats your experience with this topic?
    Thanks

    I would store them on the server and not in the database as e.g. ORDImage objects (InterMedia). Last approach is more complex. You have to retrieve them from the database and if you use ORM the framework needs to support this type of object. If you store the images on an Oracle AS they can still be cached.
    Ronald

  • Which is the best way Applets or JSP

    Hi I am trying to develop a application to
    run on the internet .It involves few master detail table in each form and 10 Different functions.The forms needs to have LOVs and other validations.Which will be the best way to go.Total tables involved would be around
    40 and coulumns in these tables would be (15 - 40).
    Any suggestions
    jagan
    null

    I'll give you my input/opinion based on my own experience. Others may have additional considerations to add, or may want to disagree with some of my points:
    Benefits of JSPs:
    1. This is an evolving technology that a lot of people are now using. It is very powerful, and the performance is pretty good.
    2. It is much easier to deploy than an applet.
    3. It will continue to improve and be easier to work with, especially with our upcoming 3.2 release.
    4. Does not require a lot of Java experience.
    Drawbacks of JSPs:
    1. No GUI editor for laying out the user interface. You are using HTML code in a text editor, which is trickier to see how the UI will look as you go. Again, this will continue to improve over time, and our 3.2 release will make it a little easier to deal with the HTML and Java code.
    Benefits of Applets:
    1. There is a UI editor for designing the layout, but layout in Java can be tricky.
    Drawbacks of Applets:
    1. Deployment can be very error prone.
    2. Subject to security restrictions such as the database you connect to and the webserver the applet runs from must be on the same machine. You can work around this, but it complicates matters.
    3. Clients need to have the Java Plug-in installed with their browser.
    4. Performance is not great, especially for a lot of data going back and forth.
    5. Requires that the applet code is downloaded to the client, temporarily at least, at runtime. The more code you have in your applet, the longer it takes to download when the client invokes it.
    Bottom line is that Applets are fine for small tasks, and are preferable for 'intranet' use versus 'internet' use (outside).

Maybe you are looking for

  • How to Auto open PS CS3 instead of CS5

    Clicking on a .psd file opens photoshop CS5. Is there a way to automatically open CS3 instead? I have changed the "open with" info several times but still I get CS5. My next step will be to rename the app or uninstall it. Thanks.

  • Lossless quality in the future? (and how do you burn a pink floyd album?)

    $9.99 for an album is very impressive, yet there are some problems that keep me from buying albums from the music store which I would like answered. -Will Apple ever give customers the option to download music in lossless formats? Until they do, I wi

  • Transferring iPhoto library from old MacBook Pro to new Yosemite Mac Mini

    Please can someone help me figure out how to do this correctly? My old Macbook (4-5 years old) died and I ended up buying a Mac Mini the other day. The store backed my old iPhoto library up for me on an external hard drive. I simply transferred the l

  • System is showing 7 leading zeros in assignment field

    Hi,   I have posted one document through F-29 and  in assignment field i have assigned cheque number which is a six digit number and then i run FF68 (Edit check deposit list), when i save that document system creates one accounting document but autom

  • MSEG - Recommended maximum number of records?

    Hi all, This is probably an oldie but a goodie.... does anyone know if SAP has a recommended maximum number of entries for table MSEG? I've got around 43 million entries and have terrible performance on MB51 reports and custom reports hitting this ta