This content has been marked as final. Show 3 replies
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.
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
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;
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
scale := 'color='||color||' texture='||texture||' shape='||shape||' location='||location||'';
OPEN getphotos (scale);
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());
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 :)