Comparing two images with Imaging Lingo

Hi everybody!
Here's the deal: I have two grayscale images and I want to
find out where they match the closest. I want to compute the
difference between the two and find the spot with the least
difference.
So I copy one into the other with the #ink: 38 ("subtract")
and wherever is the darkest spot the images are closest alike.
Right? Wrong!
When Director subtracts one color from the other and the
result is below 0, Director adds another 256 so the result is
always between 0 and 255. When I use "subtract pin" the result is
almost completely black, so this doesn't help as well. I thought
about simulation high dynamic range images with some stupid hacks
but to no avail.
Where am I thinking wrong? Can I compute the difference with
Imaging Lingo? Any help is greatly appreciated.

Here's an idea: use reverse ink to copy one image onto the
other. The areas which are most nearly white in the resulting image
will be the closest match. You can adapt the code found at
nonlinear.openspark.com
to isolate the pixels that are nearly white.

Similar Messages

  • How do we compare two images in labview?

    I have created a back end code which is comparing two images using LABVIEW.i have used a comparator and put a tolerance factor which will help me filter out almost same images.the problem i am facing is that on subtraction of the given two images i am getting a completely random output with noise surrounding the parts of the image which are being compared.Also the tolerance percentage i have given has not been working very effectively.Kindly let me know if there is an easier solution to my task or what needs to be done
    Thank you

    Can you post your code?
    Randall Pursley

  • How to compare two images through golden Template analysis?

    hi,
       How to compare two images through golden Template analysis?
    Regards
    Dibya 

    Hi Dibya,
    you can skip the pattern matching part if it's not interesting to you. Only look at the "GoldenTemplate"-part.
    I can't (and will not) look at the example in more detail, but generally such examples are given with block diagram...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Comparing Two Images

    Hi All,
    I need to compare two images to detect if they are identical. This algorith
    needs to work for gray scale and colour.
    What I have done for gray scale is use a compare function (with clear if =)
    and then perform a histrogram function on the resulting image. I then check
    the distrubution of the 1 to 255 elements to see if they have any pixels.
    If they do I know the images are not the same.
    With a colour image I perform the compare function on each colour. Add the
    resulting images and then run the histogram method.
    This function seems to work OK but I can't help thinking there must be an
    easier methode for achieving this.
    Does anyone have any ideas?
    Thanks.
    Denis

    Hi Brent,
    thanks for your input. I implemented your method and it works fine.
    However I did some timing test and came up with the following observations:
    Method 1 Method 2
    8bit Images Fastest
    16bit Images Fastest
    Float Images Fastest
    Complex Image --- Not Supported ---
    RGB Image Equal Equal
    HSL Very Slow Not Supported
    I find it interesting that the method I suggested typically executes quicker
    then the one you suggested. Additionally my method supports HSL (this might
    not be important - I've never had to use HSL.
    I have include these finding for your benefit, and anyone else that might
    have an interest in this t
    opic.
    I have included my source code in case anyone would like to look at it. If
    anyone has any thoughts or alterations, I would be interested in hearing
    them.
    Thanks
    Denis
    [Attachment Test.llb, see below]
    Attachments:
    Test.llb ‏184 KB

  • Compare two images

    Hai Java Guys,
    How to compare two images using java.If any thing different at any place ,we have to give details of that pixel.It is GIS project.If anybody know solution for this plz let me know.Thank you in asdvance.
    Basha

    If the two images are represented as java.awt.Images and have the same scale you can use the java.awt.image.PixelGrabber to obtain an array of the pixel values for each image. Compare the values of these two arrays, and you know where in the images you have differing pixels.

  • Can anybody tell how to compare two documents with two pointers controlled with the same mouse

    can anybody tell how to compare two documents with two pointers controlled with the same mouse ??

    I saw what I need but in a game to find the differences between two photos (two screens, two pointers controlled by one mouse), and I need a program to make the same thing   (compare a chosen files)

  • How to compare two images and display the difference on Front Panel

    HI..
    I have attached two images.
    I want to compare these two images and subtract the differenc from these two images and display the difference(the mouse) on the front panel
    Anyone can help me?
    Really thanks
    Attachments:
    IMG_2117.JPG ‏1677 KB
    IMG_2118.JPG ‏1650 KB

    The missing thing. You have to keep in mind that what you see is not the same as the camera sees.
    So when using IMAQ Substract it gives you the difference of the value of every single pixel!
    In order to find the mouse as only difference you have to manage that every other pixel value stays the same, e.g. with a proper lightening.
    At the other hand you can combine different filters or alogorithms to get the object, e.g. if the object is darker or brighter then everything else in the image you could use a threshold and then use morphologic operations to get the objects size and position.
    Christian

  • How to compare two images

    hey frens..i m building a motion detector in java....the problem is this, i have two bufferedimages from webcam...these are consecutive images taken from webcam...i need to compare these two images to check for any changes....i have no idea how to do this...i m trying getRGB() method for this purpose but i think i m not correctly applying it....
    so if anyone have any idea how to do this..plzz reply...

    Take the RGB value from the second image and subtract it from the first.
    If the values are the same, the result will be 0 (or black). If the values are different the result will be 0 < x < 255 and the result will be closer to white.
    This works really well for black and white images.

  • Compare two dateTime with different timezone

    HI, All,
    I found a strange thing when compare two dateTime in BPEL;
    In my BPEL process, client passed a date time to the process , and the process compare the date time with current data time.
    1.client pass cutoffDate to process
    2. in a switch activity, I compare cutoffDate with current date. code:
    bpws:getVariableData('cutoffDate')<=xpath20:add-dayTimeDuration-to-dateTime()
    but seems this compare ignored the timezone information.
    For example:
    cutoffDate=2010-03-05T06:17:38.838+00:00
    currentDate=2010-03-05T14:10:38.838+08:00 this time =2010-03-05T06:10:38.838+00:00
    but cutoffDate<currentDate == true... seems it ignored the timezone info..
    This is a bug or I used a wrong compare function?
    Thanks.
    Edited by: Colin Song on Mar 5, 2010 3:28 PM

    Hi Colin,
    Please go through below link, there is topic about calculating difference between dates. Hope you find solution.
    http://blogs.oracle.com/reynolds/2007/07/19/
    Please let me know, if still not successful.
    Thx,

  • Compare two dates with NULL in one

    I am trying to do the following with a simple SQL. Compare two dates and get the latest one, but the greatest() function always returns NULL if NULL is present. So how can I do it ?
    Date1 Date2 Desired Result
    Null 01-Dec-09 01-Dec-09
    01-May-09 01-Mar-09 01-May-09
    01-May-09 NULL 01-May-09
    01-May-09 01-Nov-09 01-Nov-09
    NULL NULL NULL
    Any suggestion ? Thanks

    Hi,
    Try this,
    create table test1
    fdate date,
    tdate date
    insert into test1 values (null,'25-jan-2010');
    select greatest(nvl(fdate,tdate),nvl(tdate,fdate)) greatest from test1;
    Thanks&Regards,
    Jai

  • Comparing Two tables with 300k records and update one table

    Could you let me know how to compare two tables having 300k records and update one table.below is the scenario.
    Table Tabl_1 has columns A,B and Tabl_2 has columns B,new_column.
    Column B has same data in both the tables.
    I need to update Tabl_2 in new_column with Tabl_1 A column data by comparing B column in both tables.
    I m trying to do using PLSQL Tables.
    Any suggestion?
    Thanks.

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved, so that the people who want to help you can re-create the problem and test their ideas.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    If you're asking about a DML statement, such as UPDATE, the CREATE TABLE and INSERT statements should re-create the tables as they are before the DML, and the results  will be the contents of the changed table(s) when everything is finished.
    Always say which version of Oracle you're using (for example, 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002
    ef2019c7-080c-4475-9cf4-2cf1b1057a41 wrote:
    Could you let me know how to compare two tables having 300k records and update one table.below is the scenario.
    Table Tabl_1 has columns A,B and Tabl_2 has columns B,new_column.
    Column B has same data in both the tables.
    I need to update Tabl_2 in new_column with Tabl_1 A column data by comparing B column in both tables.
    I m trying to do using PLSQL Tables.
    Any suggestion?
    Thanks.
    Why are you trying to use PL/SQL tables?  If tabl_1 and tabl_2 are regular database tables, it will be much simpler and faster just to use them.
    Depending on your requirements, you can do an UPDATE or MERGE, either in SQL or in PL/SQL.

  • Comparing two numbers with different formats

    Dear Java developers
    I am trying to compare two numbers but they have different formats. long x = 8981261369, Object obj = "8,981,261,369".
    I am trying to see if this two values are equal which is the case in the example above except one has a thousand separator but not sure how to do that.
    How can I lose the thousand separator and just compare them as two long values.
    Your input will be much appreciated
    Thanks

    iu433 wrote:
    I need a generic way of doing this. Because sometimes the Object does not have a thousand separator. Can i use some kind of NumberFormat to do this.You'll need to know what formats the string (not the number--as already mentioned, numbers don't have formats) can have, and then try them one by one.
    Of course, there can be some ambiguity. Does "123,456" represent one hundred twenty three thousand four hundred fifty six, or is that comma a decimal separator, and it represents one hundred twenty three and four hundred fifty six thousandths?
    The point is, you have to have a clear definition of what formats are allowed and how to determine which one it is. There's no magic way for Java to do that for you.

  • 100% view while comparing two images

    I view the original and a working copy on my display and enlarge both with the "Z" key to 100%. Unfortunately they are not in synch meaning I do not see the same crop from each picture. How can I lock both images the way I can see the same area of both when I am moving one of them around?

    Help partially, thanks, but..
    WHen i have both images in 10%% and press/hold shift key then I can move around synched, that's fine, however, when I have both images on display and press "Z" to view at 100% the images are not in synch - that's the important part.

  • Comparing two queries with VBA macro

    Hi,
    I have a workbook woth 2 sheets. Every sheet has a BEx query (so 2 queries).
    I need, for every column in the first query, to check if it is present in the second query, to generate a list with the NOT PRESENT values (or simply, marking the not present values).
    I tried with Searching excel functions by column, but every query hs more that 30.000 rows, so it takes a long time.
    I think I have to use an excel macro. I have been lookong for in the forum but my doubt is that I have to execute when the two queries has been refreshed.
    How can I know when the two queries has been refreshed?
    Is there any other way to do it?
    Any idea of how to reference a query from the other?
    I think the code shoud be in this way:
    for every row in the first colum of 1st query
    look in every row in the first column of 2nd query
    mark in first query if not present.
    If I put the macro in 1st query, how can I reference the 2nd one?

    Hi Oscar, there are several ways to do this.
    The easiest way would be:
    1.  in the SAPBEXonRefresh subroutine (which you will find in the SAPBEX Module attached to your query-containing workbook), add code that looks something like this:
    Set ws = resultArea.parent
    if ws is nothing then exit sub
    resultArea.name = ws.codename & "_results"
    ws.Range("D2") = Date
    if queryID = "SAPBEXq0002" then Call CompareQueries(queryID)
    'make the query ID that of the second query
    This will create named ranges in Excel so that you can easily locate the result tables later.  And, ensure that you know the date that each query was refreshed.  And, after the second query is refreshed, it will call your query comparison routine.
    2.  In the comparison routine, you will need something like this:
    set ws1 = Query1 'assuming that you have set the code name of the first query sheet as Query1
    set ws2 = Query2 'assuming that you have set the code name of the second query sheet as Query2
    'set ranges for the two result tables
    set Range1 = ws1.codename & "_results"
    set Range2 = ws2.codename & "_results"
    'locate first and last Row and Column for result tables
    firstRow1 = Range1.cells(1).row
    firstCol1 = Range1.cells(1).column
    numCells = Range1.cells.count
    lastRow1 = Range1.cells(numCells).row
    lastCol1 = Range1.cells(numCells).column
    'do same for Range2
    'locate the columns you want to compare
    searchCol = 0
    for j = firstCol1 to lastCol1
        if cells(firstRow1, j) like "some text here" then
            searchCol = j
            exit for
        end if
    next j
    if searchCol = 0 then
        msgbox "Did not find ""some text here"".", vbCritical
        exit sub
    Else:
        set SearchRange = ws1.cells(1, searchCol).entireColumn
    end if
    for j = firstCol2 to lastCol2
        if cells(firstRow2, j) like "some text here" then
            searchCol = j
            exit for
        end if
    next j
    'do the search
    for i = firstRow2 to lastRow2
        searchFor = cells(i, searchCol)
        matchRow = 0
        on error resume next
        matchRow = Application.worksheetfunction.match(searchFor, SearchRange, 0)
        if matchRow > 0 then
            cells(i, lastCol2+1) = "match found on row " & matchRow
        Else:
            cells(i, lastCol2+1) = "NOT PRESENT"
        End if
    next i
    - Pete

  • Compare two months with time-dependent master data

    Hi gurus,
    I have the requirement to make a query that compares values from two months but the key figures are restricted by a time-dependent atributte, I created a structure restricted with an Exit-variable that fills the month in course and the month before, the issue is that query designer only accepts individual variables so only one month displays data.
    Is there a way to use several key-dates so the time-dependent attributes can be used for especific months?
    Regards,
    Gerardo.

    Thanks Raj,
    If there´s no other option I will include attributes in cube. Check if points are correctly assigned
    Regards,
    Gerardo

Maybe you are looking for

  • How do I get rid of the annoying freezing that happens EVERY time I link my computer to Apple tv?

    Everytime I try to watch a movie from the internet on Apple TV I get a frozen screen.  This is not what was advertised.  Netflix runs fine.  Itunes movies have to be sent via 'the cloud' as i tunes won't work directly either.  Basically it seems Appl

  • Adobe only prints in shrunken size. How to fix?

    When I try to print anything from adobe reader 8.2.6 it always prints as if it has been shrunk and is practically useless because it is so small a print onealmost  needs a magnifier to read it. I have windows Vista home Premium Ver6.0.6002 Service Pa

  • Cannot open Photoshop Elements 4.0

    My daughters gave me Adobe Photoshop Elements 4.0, the installation was successful, but when I open the program, I get this message: "Your Adober Photoshop Elements user name, organization, or serial number is missing or invalid. The application cann

  • Cleaning Media Cache Database Questions

    Does cleaning the Media Cache Database only delete the cache and database links for missing files in the current project? Or does it do it for all of your PPro projects located on your computer except the current project you have open? How do I delet

  • Reports in PM

    Dear All, Is there any standard report available for following, 1. Monthly/Yearly report of items indented, on Cost Center wise 2. Report of Equipments Sub-contracted If standard reports are not available, is there any work around to get these report