mpeg 7 demo(LIRE)

  • G2_960930
    了解作者
  • 2.1MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-09 09:24
    上传日期
JAVA 实现的mpeg7标准的demo
LireDemo-0.7.rar
内容介绍
/* * LireDemoFrame.java * * Created on 20. Februar 2007, 10:37 */ package liredemo; import java.awt.dnd.DropTargetDragEvent; import java.awt.dnd.DropTargetDropEvent; import java.awt.dnd.DropTargetEvent; import java.io.File; import net.semanticmetadata.lire.ImageSearchHits; import net.semanticmetadata.lire.ImageSearcher; import net.semanticmetadata.lire.ImageSearcherFactory; import net.semanticmetadata.lire.utils.ImageUtils; import org.apache.lucene.document.Document; import org.apache.lucene.index.IndexReader; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.awt.image.BufferedImage; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import edu.uniklu.itec.mosaix.ImageFunctions; import edu.uniklu.itec.mosaix.engine.Engine; /* * This file is part of the Caliph and Emir project: http://www.SemanticMetadata.net. * * Caliph & Emir is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Caliph & Emir is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Caliph & Emir; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright statement: * -------------------- * (c) 2002-2008 by Mathias Lux (mathias@juggle.at) * http://www.juggle.at, http://www.SemanticMetadata.net */ import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.SystemFlavorMap; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.dnd.DnDConstants; import java.awt.dnd.DropTarget; import java.awt.dnd.DropTargetListener; import java.io.FilenameFilter; import java.net.URL; import javax.swing.filechooser.FileNameExtensionFilter; import liredemo.flickr.FlickrIndexingThread; /** * This file is part of the Caliph and Emir project: http://www.SemanticMetadata.net * * @author Mathias Lux, mathias@juggle.at */ public class LireDemoFrame extends javax.swing.JFrame { private Color highlightHoverColor = Color.decode("#dddddd"); private Color highlightSelectColor = Color.decode("#eeeeee"); private SearchResultsTableModel tableModel = new SearchResultsTableModel(); private IndexReader browseReader = null; /** * Creates new form LireDemoFrame */ public LireDemoFrame() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { } initComponents(); try { Image icon = ImageIO.read(getClass().getResource("/resources/viewmag16.png")); if (icon!=null) setIconImage(icon); } catch (IOException ex) { Logger.getLogger(LireDemoFrame.class.getName()).log(Level.SEVERE, null, ex); } selectboxDocumentBuilder.setSelectedIndex(5); buttonSwitchIndex.setBackground(highlightSelectColor); DropTarget t = new DropTarget(searchPanel, new DropTargetListener() { public void dragEnter(DropTargetDragEvent dtde) { } public void dragOver(DropTargetDragEvent dtde) { } public void dropActionChanged(DropTargetDragEvent dtde) { } public void dragExit(DropTargetEvent dte) { } public void drop(DropTargetDropEvent dtde) { try { Transferable tr = dtde.getTransferable(); DataFlavor[] flavors = tr.getTransferDataFlavors(); for (int i = 0; i < flavors.length; i++) { System.out.println("Possible flavor: " + flavors[i].getMimeType()); if (flavors[i].isFlavorJavaFileListType()) { dtde.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE); java.util.List list = (java.util.List) tr.getTransferData(flavors[i]); textfieldSearchImage.setText(list.get(0).toString()); dtde.dropComplete(true); return; } } } catch (Exception e) { e.printStackTrace(); } } }); } /** * This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { sameSearchMenu = new javax.swing.JMenu(); searchMpeg7Descriptors = new javax.swing.JMenuItem(); searchColorLayout = new javax.swing.JMenuItem(); searchEdgeHistogram = new javax.swing.JMenuItem(); searchScalableColor = new javax.swing.JMenuItem(); searchAutoColorCorrelation = new javax.swing.JMenuItem(); mosaicButtons = new javax.swing.ButtonGroup(); topPane = new javax.swing.JPanel(); controlPane = new javax.swing.JPanel(); switchButtonsPanel = new javax.swing.JPanel(); jPanel5 = new javax.swing.JPanel(); buttonSwitchIndex = new javax.swing.JButton(); buttonSwitchSearch = new javax.swing.JButton(); buttonSwitchBrowse = new javax.swing.JButton(); buttonSwitchMosaic = new javax.swing.JButton(); buttonSwitchOptions = new javax.swing.JButton(); buttonSwitchAbout = new javax.swing.JButton(); cardPanel = new javax.swing.JPanel(); indexPanel = new javax.swing.JPanel(); textfieldIndexDir = new javax.swing.JTextField(); buttonOpenDir = new javax.swing.JButton(); buttonStartIndexing = new javax.swing.JButton(); progressBarIndexing = new javax.swing.JProgressBar(); jLabel6 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); checkBoxAddToExisintgIndex = new javax.swing.JCheckBox(); searchPanel = new javax.swing.JPanel(); textfieldSearchImage = new javax.swing.JTextField(); buttonOpenImage = new javax.swing.JButton(); buttonStartSearch = new javax.swing.JButton(); progressSearch = new javax.swing.JProgressBar(); jLabel5 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); browsePanel = new javax.swing.JPanel(); jLabel10 = new javax.swing.JLabel(); labelDocCount = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); spinnerCurrentDocNum = new javax.swing.JSpinner(); spinnerMaxDocCount = new javax.swing.JSpinner(); imageLabel = new javax.swing.JLabel(); buttonSearchFromBrowse = new javax.swing.JButton(); mosaicPanel = new javax.swing.JPanel(); textfieldMosaicImage = new javax.swing.JTextField(); buttonOpenMosaicImage = new javax.swing.JButton(); buttonStartMosaicing = new javax.swing.JButton(); progressMosaic = new javax.swing.JProgressBar(); labelMosaicTitle = new javax.swing.JLabel(); mosaicTileCountSlider = new javax.swing.JSlider(); jLabel12 = new javax.swing.JLabel(); mosaicImageLable = new javax.swing.JLabel(); buttonMosaicSave = new javax.swing.JButton(); jLabel13 = new javax.swing.JLabel(); mosaicAdvanceOptionsPanel = new javax.swing.JPanel(); pan
评论
    相关推荐
    • Java
      Java 对于Java练习
    • java
      Java Java基础
    • Java
      Java 我创建的Java项目
    • JAVA教程
      一本非常不错的清华大学java教程,讲解非常详细,看了就知道。
    • Java Cipher
      Java Cipher 加密和解密工具 附带源码 Java Cipher 加密和解密工具 附带源码 Java Cipher 加密和解密工具 附带源码 Java Cipher 加密和解密工具 附带源码
    • javabank
      Java银行 Java com的模拟操作将在bancárias上发布! 要求:Java 8。
    • java 李兴华
      java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java ...
    • Java204
      支持中文,支持动态注释的超强Java语言反编译器。 注意:Java204的工作目录中不能包含中文字符!! 支持现有所有Java环境产生的Class代码,而最重要的是它生成的源代码可读性极好,又充分考虑了国人的Java编码习惯,...
    • java程序
      java程序-吃点点java程序-吃点点java程序-吃点点java程序-吃点点java程序-吃点点java程序-吃点点
    • Java
      Java 2021/02/19 .java Main.java 学生.java Bmi.java 。班级 Bmi类 主类 MyBmi.class 学生班 学生样本类 2021/02/20 .java DeleteFile.java WriteFile.java MyDataPrint.java 。班级 DeleteFile.class ...