zoukankan      html  css  js  c++  java
  • 基于linux下的krpano的使用

    鉴于目前网络上关于krpano的使用和介绍少之又少,结合自己的学习和使用经历,做个总结和记录。

    1.安装

    下载地址:

    linux

    https://krpano.com/forum/wbb/index.php?page=Thread&threadID=15064

    windows: 可自行百度,这块网上的资源比较多,建议下载,有些配置文件在linux里可以直接拿来用,作为学习入门还是不错的

    直接下载即可

    2.注册

    下载完成后进入下载目录。如果没有通过注册,生成的图片是带有水印的,注册的命令是./krpanotools register ###  #处填写注册码。

    3.生成全景图的命令

       ./krpanotools makepano -config=配置文件目录 filepath

    4.配置文件

    basicsettings.config

    # Basic Settings
    # Documentation: http://krpano.com/tools/kmakemultires/config?version=119
    # krpano 1.19
    
    
    # image filtering and compression settings
    filter=LANCZOS
    jpegquality=82
    jpegsubsamp=422
    jpegoptimize=true
    
    
    # load gps exif information from the input files and transfer them to the xml
    parsegps=true
    
    
    # parse the input files for orientation / leveling information and either 
    # directly remap the images or add a prealign setting in the xml to level them
    autolevel=remap
    
    
    # sort the input files alphabetically
    sortinput=true
    
    
    # protection settings (nomb = no Flashplayer menubar for standalone swf)
    kprotectclparameters=-nomb

    normal.config

    # Normal/Single-Resolution Panos
    # Skin with Default Buttons
    # Documentation: http://krpano.com/tools/kmakemultires/config?version=119
    # krpano 1.19
    
    
    # basic settings
    include basicsettings.config
    panotype=autodetect
    hfov=360
    
    
    # output
    flash=true
    html5=true
    
    
    # convert spherical/cylindrical to cubical
    converttocube=true
    converttocubelimit=360x45
    
    
    # multiresolution settings
    multires=false
    maxsize=8000
    maxcubesize=2048
    
    
    # output images path
    tilepath=%INPUTPATH%/%BASENAME%/%BASENAME%.tiles/pano[_c].jpg
    
    
    # preview pano settings
    preview=true
    graypreview=false
    previewsmooth=25
    previewpath=%INPUTPATH%/%BASENAME%/%BASENAME%.tiles/preview.jpg
    
    
    # generate smaller mobile images
    #customimage[mobile].size=1024
    #customimage[mobile].path=%INPUTPATH%/%BASENAME%/%BASENAME%.tiles/mobile_%s.jpg
    #customimage[mobile].imagesettings=jpegquality=85 jpegsubsamp=444 jpegoptimize=true
    #customimage[mobile].xml=<mobile>[NL][TAB]<cube url="[PATH]" />[NL]</mobile>
    
    
    # xml output
    xml=true
    xmlpath=%INPUTPATH%/%BASENAME%/pano.xml
    
    
    # skin / xml template
    include defaultbuttons.skin
    
    
    # html output/template
    html=true
    htmlpath=%INPUTPATH%/%BASENAME%/index.html
    htmltemplate=html/embedpano.html
    
    
    # include testing servers
    htmltemplate_additional_file=html/tour_testingserver.exe
    htmltemplate_additional_file=html/tour_testingserver_macos+x

     基本上可以满足大多数需求,也可以通过windows安装包自带的一些配置。官网文档

    使用过程中遇到的一些问题:

    1.前期处理较小的图片文件没什么问题,当处理的图片文件较大时,脚本容易出现假死的情况,此时如果用到是node的exe或者shelljs 时,衍生shell时应该增加maxBuffer 配置。

    2.前期使用了基于redis的订阅发布模式获取数据,只能一个进程处理,效率比较低,后来采用了redis队列的方式,使用PM2管理node进程,效率明显升高。

    3.类似图形处理的程序对cpu的要求比较高,使用的时候应该注意。

  • 相关阅读:
    Linux系统编程之--守护进程的创建和详解【转】
    【转】Android虚拟平台的编译和整合
    【转】6.4.6 将驱动编译进Linux内核进行测试
    【转】Linux驱动模块编译进内核中
    【转】Android HAL实例解析
    【转】ubuntu下解压缩zip,tar,tar.gz和tar.bz2文件
    【转】Linux下tar.xz结尾的文件的解压方法--不错
    【转】linux tree命令以树形结构显示文件目录结构 ---- 不错
    【转】NDK编译可执行文件在Android L中运行显示error: only position independent executables (PIE) are supported.失败问题解决办法。------不错
    【转】Notepad++ 快捷键 大全 官方整理过来的
  • 原文地址:https://www.cnblogs.com/cangqinglang/p/10674711.html
Copyright © 2011-2022 走看看