This discussion is archived
3 Replies Latest reply: Jun 28, 2012 2:14 PM by mannamal RSS

Image searching interface

941581 Newbie
Currently Being Moderated
Hi all,

I need to build some basic interface which I will use to search my database (where I'm storing images). I want to view images, informations (SI_StillImage, SI_AverageColor, SI_Color, SI_ColorHistogram, SI_FeatureList, SI_PositionalColor, and SI_Texture), semantic metadata, compare pictures. Which tool I should use? Do you have some tutorials how can I do this? I'll be appreciate if you can help me.
  • 1. Re: Image searching interface
    858810 Newbie
    Currently Being Moderated
    You have to use a Pl/SQL block to get at the SI_ values once you have successfully inserted an image into the DB. I don't know off-hand if the DB supports extended semantic metadata but if so, you'd use the same mechanism as that for the SI_ values.

    As to image comparison, are you trying to do something similar to TinEye? If so, you'd have to integrate an image search/comparison library which is difficult even for experienced systems integrators to do.

    There are very few tutorials available for Oracle Multimedia. If you can be more specific I can point you in a general direction but be forewarned, there is a reason for the lack of tutorials - Oracle Multimedia is complex and requires a high degree of skill for proper use.
  • 2. Re: Image searching interface
    941581 Newbie
    Currently Being Moderated
    I did it but I have other problem. I created id, pictures and sygnature column in "Pictures" table. I have copied some pictures to "Pictures" table (I used stored procedure which generated sygnatures). When tried compile other stored procedure I received this message :

    Error(12,4): PL/SQL: SQL Statement ignored;
    Error(12,39): PL/SQL: ORA-00904: "ORDSYS"."IMGSIMILAR": incorrect identifier

    This stored procedure you can find below:


    create or replace
    procedure find (color varchar2, texture varchar2, shape varchar2, location varchar2, sensitivity number) is
    scale varchar2(200);
    number number;
    idd NUMBER;
    image ORDSYS.ORDIMAGE;
    query_signature ORDSYS.ORDIMAGESIGNATURE;
    query_image ORDSYS.ORDIMAGE;
    ctx raw(64) := null;

    CURSOR getphotos (c_scale varchar2) IS
    SELECT id, picture FROM pictures WHERE

    ordsys.imgsimilar(sygnature, query_image, c_scale, sensitivity) =1 order by id;

    BEGIN
    SELECT picture INTO query_image FROM tab_obr WHERE id = (select max(id) from tab_obr ) ;
    -- Initialize signature object
    query_signature := ORDSYS.ORDIMAGESIGNATURE.init();
    -- Create temporary storage for the LOB in the signature object
    DBMS_LOB.CREATETEMPORARY(query_signature.signature, TRUE);
    query_signature.generateSignature(query_image);
    scale := 'color='||color||' texture='||texture||' shape='||shape||' location='||location||'';
    OPEN getphotos (scale);
    LOOP
    FETCH getphotos INTO idd, image;
    EXIT WHEN getphotos%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE('Image with ID ' || idd || ' matches query image');
    insert into tab_obr2 (select * from picture where id=idd);
    image.export(ctx, 'FILE', 'PICTURE_KAT_EKSS', image.getSourceName());
    END LOOP;
    CLOSE getphotos;
    DBMS_LOB.FREETEMPORARY(query_signature.signature);
    END;

    Can you help me and tell me why I cannot compile this procedure? I have generated sygnatures before I tried compile procedure above...

    I'm so sorry for my bad English :)
  • 3. Re: Image searching interface
    mannamal Explorer
    Currently Being Moderated
    What version of the database are you using? IMGSimilar has been deprecated and will not work in 11.2.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points