如何输出*.ply文件

2023-10-27

所谓ply文件格式,是由斯坦福大学开发的一套三维mesh模型数据格式,图形学领域内很多著名的模型数据,比如斯坦福的三维扫描数据库(其中包括很多文章中会见到的Happy Buddha, Dragon, Bunny兔子)最初的模型都是基于这个格式的。其开发目标是,建立一套针对多边形模型的,结构简单但是能够满足大多数图形应用需要的模型格式,而且它允许以ASCII码格式或二进制形式存储文件。这样一套既简单又灵活的文件格式,能够帮助开发人员避免重复开发文件格式的问题。尽管在工业领域内,新的文件格式仍然在不断的出现,但是在图形学的研究领域中,PLY还是种常用且重要的文件格式。

ply数据文件格式中包含用来描述多边形的一系列点的信息:

<顶点列表>

<面片列表>

<其他元素列表>

头部是一系列以回车结尾的文本行,用来描述文件的剩余部分。头部包含一个对每个元素类型的描述,包括元素名(如“边”),这个元素在工程里有多少,以及一个与这个元素关联的不同属性的列表。头部还说明这个文件是二进制的或者是ASCII的。头部后面的是一个每个元素类型的元素列表,按照在头部中描述的顺序出现。

以下是一个立方体的完整ASCII描述。相同工程的二进制版本头部的唯一不同是用词“binary_little_endian”或者“binary_big_endian”替换词“ascii”。大括号中的注释不是文件的一部分,它们是这个例子的注解。文件中的注释一般在“comment”开始的关键词。

format ascii 1.0;
comment made by anonymous;
/*comment this is a cube*/ 
element vertex 8; 
property float32 x ;
property float32 y ;
property float32 z ;
element face 6 ; 
property list uint8 int32 vertex_index ;
end_header;
/*list vertex*/
0 0 0 
0 0 1 
0 1 1 
0 1 0 
1 0 0 
1 0 1 
1 1 1 
1 1 0 
/*list face*/
4 0 1 2 3
4 7 6 5 4 
4 0 4 5 1 
4 1 5 6 2 
4 2 6 7 3 
4 3 7 4 0 

这个例子说明头部的基本组成。头部的每个部分都是以一个关键词开头以回车结尾的ASCII串。即使是头部的开始和结尾(“ply”和“end_header”)也是以这种形式。因为字符“ply”是文件的魔法数字,必须是文件的头四个字符。跟在文件头部开头之后的是关键词“format”和一个特定的ASCII或者二进制的格式,接下来是一个版本号。再下面是多边形文件中每个元素的描述,在每个元素里还有多属性的说明。一般元素以下面的格式描述:

element <元素名> <在文件中的个数>

property <数据类型> <属性名-1>

property <数据类型> <属性名-2>

property <数据类型> <属性名-3>

...

属性罗列在“element”(元素)行后面定义,既包含属性的数据类型也包含属性在每个元素中出现的次序。一个属性可以有三种数据类型:标量,字符串和列表。属性可能具有的标量数据类型列表如下:

int8 字符 1

uint8 非负字符 1

int16 短整型 2

uint16 非负短整型 2

int32 整型 4

uint32 非负整型 4

float32 单精度浮点数 4

float64 双精度浮点数 8

这些字节计数很重要,而且在实现过程中不能修改以使这些文件可移植。使用列表数据类型的属性定义有一种特殊的格式:

 property list <数值类型> <数值类型> <属性名>

这种格式的一类例子是上面的立方体文件中的property list uint8 int32 vertex_index,这表示属性“vertex_index”首先包含一个非负字符报苏在属性里包含多少索引,接下来是一个列表包含许多整数。在这个边长列表里的每个整数都是一个顶点的索引。

以下是一个基于C++的读入ASCII文件或二进制文件,输出ply文件的程序。首先定义头文件ply.h

/*

Header for PLY polygon files.

- Greg Turk, March 1994

A PLY file contains a single polygonal _object_.

An object is composed of lists of _elements_.  Typical elements are
vertices, faces, edges and materials.

Each type of element for a given object has one or more _properties_
associated with the element type.  For instance, a vertex element may
have as properties three floating-point values x,y,z and three unsigned
chars for red, green and blue.

*/

#ifndef __PLY_H__
#define __PLY_H__

#ifdef __cplusplus
extern "C" {
#endif

#include 
    
    
     
     
#include 
     
     
      
      

#define PLY_ASCII      1        /* ascii PLY file */
#define PLY_BINARY_BE  2        /* binary PLY file, big endian */
#define PLY_BINARY_LE  3        /* binary PLY file, little endian */

#define PLY_OKAY    0           /* ply routine worked okay */
#define PLY_ERROR  -1           /* error in ply routine */

/* scalar data types supported by PLY format */

#define PLY_START_TYPE 0
#define PLY_CHAR       1
#define PLY_SHORT      2
#define PLY_INT        3
#define PLY_UCHAR      4
#define PLY_USHORT     5
#define PLY_UINT       6
#define PLY_FLOAT      7
#define PLY_DOUBLE     8
#define PLY_END_TYPE   9

#define  PLY_SCALAR  0
#define  PLY_LIST    1


typedef struct PlyProperty {    /* description of a property */

  char *name;                           /* property name */
  int external_type;                    /* file's data type */
  int internal_type;                    /* program's data type */
  int offset;                           /* offset bytes of prop in a struct */

  int is_list;                          /* 1 = list, 0 = scalar */
  int count_external;                   /* file's count type */
  int count_internal;                   /* program's count type */
  int count_offset;                     /* offset byte for list count */

} PlyProperty;

typedef struct PlyElement {     /* description of an element */
  char *name;                   /* element name */
  int num;                      /* number of elements in this object */
  int size;                     /* size of element (bytes) or -1 if variable */
  int nprops;                   /* number of properties for this element */
  PlyProperty **props;          /* list of properties in the file */
  char *store_prop;             /* flags: property wanted by user? */
  int other_offset;             /* offset to un-asked-for props, or -1 if none*/
  int other_size;               /* size of other_props structure */
} PlyElement;

typedef struct PlyOtherProp {   /* describes other properties in an element */
  char *name;                   /* element name */
  int size;                     /* size of other_props */
  int nprops;                   /* number of properties in other_props */
  PlyProperty **props;          /* list of properties in other_props */
} PlyOtherProp;

typedef struct OtherData { /* for storing other_props for an other element */
  void *other_props;
} OtherData;

typedef struct OtherElem {     /* data for one "other" element */
  char *elem_name;             /* names of other elements */
  int elem_count;              /* count of instances of each element */
  OtherData **other_data;      /* actual property data for the elements */
  PlyOtherProp *other_props;   /* description of the property data */
} OtherElem;

typedef struct PlyOtherElems {  /* "other" elements, not interpreted by user */
  int num_elems;                /* number of other elements */
  OtherElem *other_list;        /* list of data for other elements */
} PlyOtherElems;

typedef struct PlyFile {        /* description of PLY file */
  FILE *fp;                     /* file pointer */
  int file_type;                /* ascii or binary */
  float version;                /* version number of file */
  int nelems;                   /* number of elements of object */
  PlyElement **elems;           /* list of elements */
  int num_comments;             /* number of comments */
  char **comments;              /* list of comments */
  int num_obj_info;             /* number of items of object information */
  char **obj_info;              /* list of object info items */
  PlyElement *which_elem;       /* which element we're currently writing */
  PlyOtherElems *other_elems;   /* "other" elements from a PLY file */
} PlyFile;

/* memory allocation */
extern char *my_alloc();
#define myalloc(mem_size) my_alloc((mem_size), __LINE__, __FILE__)


/*** delcaration of routines ***/

extern PlyFile *ply_write(FILE *, int, char **, int);
extern PlyFile *ply_open_for_writing(char *, int, char **, int, float *);
extern void ply_describe_element(PlyFile *, char *, int, int, PlyProperty *);
extern void ply_describe_property(PlyFile *, char *, PlyProperty *);
extern void ply_element_count(PlyFile *, char *, int);
extern void ply_header_complete(PlyFile *);
extern void ply_put_element_setup(PlyFile *, char *);
extern void ply_put_element(PlyFile *, void *);
extern void ply_put_comment(PlyFile *, char *);
extern void ply_put_obj_info(PlyFile *, char *);
extern PlyFile *ply_read(FILE *, int *, char ***);
extern PlyFile *ply_open_for_reading( char *, int *, char ***, int *, float *);
extern PlyProperty **ply_get_element_description(PlyFile *, char *, int*, int*);
extern void ply_get_element_setup( PlyFile *, char *, int, PlyProperty *);
extern void ply_get_property(PlyFile *, char *, PlyProperty *);
extern PlyOtherProp *ply_get_other_properties(PlyFile *, char *, int);
extern ply_get_element(PlyFile *, void *);
extern char **ply_get_comments(PlyFile *, int *);
extern char **ply_get_obj_info(PlyFile *, int *);
extern void ply_close(PlyFile *);
extern void ply_get_info(PlyFile *, float *, int *);
extern PlyOtherElems *ply_get_other_element (PlyFile *, char *, int);
extern void ply_describe_other_elements ( PlyFile *, PlyOtherElems *);
extern void ply_put_other_elements (PlyFile *);
extern void ply_free_other_elements (PlyOtherElems *);


#ifdef __cplusplus
}
#endif
#endif /* !__PLY_H__ */

     
     
    
    

Part 1 preparation

/*

The interface routines for reading and writing PLY polygon files.

Greg Turk, February 1994

---------------------------------------------------------------

A PLY file contains a single polygonal _object_.

An object is composed of lists of _elements_.  Typical elements are
vertices, faces, edges and materials.

Each type of element for a given object has one or more _properties_
associated with the element type.  For instance, a vertex element may
have as properties the floating-point values x,y,z and the three unsigned
chars representing red, green and blue.

*/

#include 
    
    
     
     
#include 
     
     
      
      
#include 
      
      
       
       
#include 
       
       
        
        
#include 
        
        
          #include 
         
           #include "ply.h" #include 
          
            using namespace std; char *type_names[] = { "invalid", "char", "short", "int", "uchar", "ushort", "uint", "float", "double", }; int ply_type_size[] = { 0, 1, 2, 4, 1, 2, 4, 4, 8 }; #define NO_OTHER_PROPS -1 #define DONT_STORE_PROP 0 #define STORE_PROP 1 #define OTHER_PROP 0 #define NAMED_PROP 1 /* returns 1 if strings are equal, 0 if not */ /* find an element in a plyfile's list */ PlyElement *find_element(PlyFile *, char *); /* find a property in an element's list */ PlyProperty *find_property(PlyElement *, char *, int *); /* write to a file the word describing a PLY file data type */ void write_scalar_type (FILE *, int); /* read a line from a file and break it up into separate words */ char **get_words(FILE *, int *, char **); char **old_get_words(FILE *, int *); /* write an item to a file */ void write_binary_item(FILE *, int, unsigned int, double, int); void write_ascii_item(FILE *, int, unsigned int, double, int); double old_write_ascii_item(FILE *, char *, int); /* add information to a PLY file descriptor */ void add_element(PlyFile *, char **, int); void add_property(PlyFile *, char **, int); void add_comment(PlyFile *, char *); void add_obj_info(PlyFile *, char *); /* copy a property */ void copy_property(PlyProperty *, PlyProperty *); /* store a value into where a pointer and a type specify */ void store_item(char *, int, int, unsigned int, double); /* return the value of a stored item */ void get_stored_item( void *, int, int *, unsigned int *, double *); /* return the value stored in an item, given ptr to it and its type */ double get_item_value(char *, int); /* get binary or ascii item and store it according to ptr and type */ void get_ascii_item(char *, int, int *, unsigned int *, double *); void get_binary_item(FILE *, int, int *, unsigned int *, double *); /* get a bunch of elements from a file */ void ascii_get_element(PlyFile *, char *); void binary_get_element(PlyFile *, char *); /* memory allocation */ char *my_alloc(int, int, char *); /*************/ /* Writing */ /*************/ /****************************************************************************** Given a file pointer, get ready to write PLY data to the file. Entry: fp - the given file pointer nelems - number of elements in object elem_names - list of element names file_type - file type, either ascii or binary Exit: returns a pointer to a PlyFile, used to refer to this file, or NULL if error ******************************************************************************/ PlyFile *ply_write( FILE *fp, int nelems, char **elem_names, int file_type ) { int i; PlyFile *plyfile; PlyElement *elem; /* check for NULL file pointer */ if (fp == NULL) return (NULL); /* create a record for this object */ plyfile = (PlyFile *) myalloc (sizeof (PlyFile)); plyfile->file_type = file_type; plyfile->num_comments = 0; plyfile->num_obj_info = 0; plyfile->nelems = nelems; plyfile->version = 1.0; plyfile->fp = fp; plyfile->other_elems = NULL; /* tuck aside the names of the elements */ plyfile->elems = (PlyElement **) myalloc (sizeof (PlyElement *) * nelems); for (i = 0; i < nelems; i++) { elem = (PlyElement *) myalloc (sizeof (PlyElement)); plyfile->elems[i] = elem; elem->name = strdup (elem_names[i]); elem->num = 0; elem->nprops = 0; } /* return pointer to the file descriptor */ return (plyfile); } /****************************************************************************** Open a polygon file for writing. Entry: filename - name of file to read from nelems - number of elements in object elem_names - list of element names file_type - file type, either ascii or binary Exit: version - version number of PLY file returns a file identifier, used to refer to this file, or NULL if error ******************************************************************************/ PlyFile *ply_open_for_writing( char *filename, int nelems, char **elem_names, int file_type, float *version ) { int i; PlyFile *plyfile; PlyElement *elem; char *name; FILE *fp; /* tack on the extension .ply, if necessary */ name = (char *) myalloc (sizeof (char) * (strlen (filename) + 5)); strcpy (name, filename); if (strlen (name) < 4 || strcmp (name + strlen (name) - 4, ".ply") != 0) strcat (name, ".ply"); /* open the file for writing */ fp = inFile (name, "w"); if (fp == NULL) { return (NULL); } /* create the actual PlyFile structure */ plyfile = ply_write (fp, nelems, elem_names, file_type); if (plyfile == NULL) return (NULL); /* say what PLY file version number we're writing */ *version = plyfile->version; /* return pointer to the file descriptor */ return (plyfile); } 
           
          
        
       
       
      
      
     
     
    
    

Part 2 description

/******************************************************************************
Describe an element, including its properties and how many will be written
to the file.

Entry:
  plyfile   - file identifier
  elem_name - name of element that information is being specified about
  nelems    - number of elements of this type to be written
  nprops    - number of properties contained in the element
  prop_list - list of properties
******************************************************************************/

void ply_describe_element(
  PlyFile *plyfile,
  char *elem_name,
  int nelems,
  int nprops,
  PlyProperty *prop_list
)
{
  int i;
  PlyElement *elem;
  PlyProperty *prop;

  /* look for appropriate element */
  elem = find_element (plyfile, elem_name);
  if (elem == NULL) {
    cerr << " ply_describe_element: can't find element" << elem_name << endl;
    exit (-1);
  }

  elem->num = nelems;

  /* copy the list of properties */

  elem->nprops = nprops;
  elem->props = (PlyProperty **) myalloc (sizeof (PlyProperty *) * nprops);
  elem->store_prop = (char *) myalloc (sizeof (char) * nprops);

  for (i = 0; i < nprops; i++) {
    prop = (PlyProperty *) myalloc (sizeof (PlyProperty));
    elem->props[i] = prop;
    elem->store_prop[i] = NAMED_PROP;
    copy_property (prop, &prop_list[i]);
  }
}


/******************************************************************************
Describe a property of an element.

Entry:
  plyfile   - file identifier
  elem_name - name of element that information is being specified about
  prop      - the new property
******************************************************************************/

void ply_describe_property(
  PlyFile *plyfile,
  ch
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何输出*.ply文件 的相关文章

  • Wpf TextBlock 中的垂直文本

    是否可以垂直显示 TextBlock 中的文本 以便所有字母彼此堆叠 不使用 LayoutTransform 旋转 还没有人提到使用纯 XAML 垂直堆叠任意字符串的字母 不旋转它们 的明显而简单的方法
  • 何时使用模拟框架?

    因此 我正在使用模拟框架 Moq 进行单元测试 并且想知道何时应该使用模拟框架 以下两个测试之间的优点 缺点是什么 public class Tests Fact public void TestWithMock Arrange var r
  • 英特尔 SSE:为什么 `_mm_extract_ps` 返回 `int` 而不是 `float`?

    为什么 mm extract ps返回一个int代替float 读单的正确方法是什么float来自 C 中的 XMM 寄存器 或者更确切地说 另一种询问方式是 其相反的是什么 mm set ps操作说明 所有答案似乎都没有真正回答问题 wh
  • 自定义代码访问安全属性

    我创建了以下属性 Serializable AttributeUsage AttributeTargets Class AttributeTargets Method AllowMultiple true Inherited true pu
  • decltype 中的可变参数模板包

    我可以写为 template lt class T0 gt struct Last0 using type decltype T0 OK compiles type T0 template lt class T0 class T1 gt s
  • ASP.NET Core 基于自定义策略的授权 - 不清楚

    好的 ASP NET Core 中基于自定义策略的授权 我有点理解这个新身份框架的想法 但仍然不是 100 清楚你可以用它实现什么 假设我们在 HomeController 中有一个名为 List 的 Action 此操作将查询并显示数据库
  • Roslyn SyntaxNode 是否被重用?

    我一直在看罗斯林CTP http msdn microsoft com en us roslyn并且 虽然它解决了类似的问题表达式树API http msdn microsoft com en us library bb397951 asp
  • 同一配置文件上的两个不同提供程序

    我在用着实体框架 6 1 0 I have 2 家提供者 MysqlClient 和 SQLServerCE 我需要创建2个不同的DBContext 这迫使我创造2个配置类因为mysql有一些不同的东西 但是当我初始化应用程序时 Datab
  • 使用 Unity 如何将命名依赖项注入构造函数?

    我有IRespository在以下代码中注册了两次 带有名称 Setup the Client Repository IOC Container RegisterType
  • 如何访问 OpenSSL 的 EVP_PKEY 结构中的原始 ECDH 公钥、私钥和参数?

    我正在使用 OpenSSL 的 c 库生成椭圆曲线 Diffie Hellman ECDH 密钥对 遵循第一个代码示例here http wiki openssl org index php Elliptic Curve Diffie He
  • 没有强命名的代码签名是否会让您的应用程序容易被滥用?

    尝试了解authenticode代码签名和强命名 我是否正确地认为 如果我对引用一些 dll 非强命名 的 exe 进行代码签名 恶意用户就可以替换我的 DLL 并以看似由我签名但正在运行的方式分发应用程序他们的代码 假设这是真的 那么您似
  • WCF RIA 服务 - 加载多个实体

    我正在寻找一种模式来解决以下问题 我认为这很常见 我正在使用 WCF RIA 服务在初始加载时将多个实体返回给客户端 我希望两个实体异步加载 以免锁定 UI 并且我想利用 RIA 服务来执行此操作 我的解决方案如下 似乎有效 这种方法会遇到
  • Web 客户端和 Expect100Continue

    使用 WebClient C NET 时设置 Expect100Continue 的最佳方法是什么 我有下面的代码 我仍然在标题中看到 100 continue 愚蠢的 apache 仍然抱怨 505 错误 string url http
  • 为什么两个不同的 Base64 字符串的转换会返回相等的字节数组?

    我想知道为什么从 base64 字符串转换会为不同的字符串返回相同的字节数组 const string s1 dg const string s2 dq byte a1 Convert FromBase64String s1 byte a2
  • 按成员序列化

    我已经实现了template
  • 秒表有最长运行时间吗?

    多久可以Stopwatch在 NET 中运行 如果达到该限制 它会回绕到负数还是从 0 重新开始 Stopwatch Elapsed返回一个TimeSpan From MSDN https learn microsoft com en us
  • ASP.NET MVC:这个业务逻辑应该放在哪里?

    我正在开发我的第一个真正的 MVC 应用程序 并尝试遵循一般的 OOP 最佳实践 我正在将控制器中的一些简单业务逻辑重构到我的域模型中 我最近一直在阅读一些内容 很明显我应该将逻辑放在域模型实体类中的某个位置 以避免出现 贫血域模型 反模式
  • 使用实体框架模型输入安全密钥

    这是我今天的完美想法 Entity Framework 中的强类型 ID 动机 比较 ModelTypeA ID 和 ModelTypeB ID 总是 至少几乎 错误 为什么编译时不处理它 如果您使用每个请求示例 DbContext 那么很
  • 如何从 appsettings.json 文件中的对象数组读取值

    我的 appsettings json 文件 StudentBirthdays Anne 01 11 2000 Peter 29 07 2001 Jane 15 10 2001 John Not Mentioned 我有一个单独的配置类 p
  • 将 VSIX 功能添加到 C# 类库

    我有一个现有的单文件生成器 位于 C 类库中 如何将 VSIX 项目级功能添加到此项目 最终目标是编译我的类库项目并获得 VSIX 我实际上是在回答我自己的问题 这与Visual Studio 2017 中的单文件生成器更改 https s

随机推荐

  • Java8中那些方便又实用的Map函数

    原创 扣钉日记 欢迎分享 转载请保留出处 简介 java8之后 常用的Map接口中添加了一些非常实用的函数 可以大大简化一些特定场景的代码编写 提升代码可读性 一起来看看吧 computeIfAbsent函数 比如 很多时候我们需要对数据进
  • 金蝶显示访问加密服务器失败,金蝶提示“访问加密服务器失败,错误号:-16”到底如何解决?...

    满意答案 处理方法 a 该方法通常适用于1台或数台客户端不能登陆的情形 不适用于全部的客户端不能登陆的情形 首先 检查服务器上有无该客户端当前登陆用户名 如有则可能是客户端的擅自更改了客户端的用户windows登陆密码 PassWORD 该
  • Dockerfile命令详解之 RUN(二):RUN --mount=type=bind

    许多同学不知道Dockerfile应该如何写 不清楚Dockerfile中的指令分别有什么意义 能达到什么样的目的 接下来我将在容器化专栏中详细的为大家解释每一个指令的含义以及用法 专栏订阅传送门https blog csdn net qq
  • python中求输出1-3+5-7+9-......101的和

    第一种 i 0 sum 0 a 0 while i lt 102 if i gt 1 and i 4 1 sum i elif i 2 0 and i 1 a a i i 1 print sum a 第二种 a 1 b 3 sum1 0 s
  • 【Java】基于easy-poi实现Excel表导入与导出

    实现功能所需依赖如下
  • C++ 命名规范(Google)

    C 命名规范 Google 需要命名类型 命名规范 规范命名示例 命名形式反例 备注 通用命名规则 函数 变量 文件等命名应具有描述性 int num errors int nerr 除非缩写放到项目外也容易明确 否则尽量少使用缩写 文件命
  • 快手-开眼快创 Flutter 实践

    快手 开眼快创 Flutter 实践 本文主要介绍快手开眼快创 App 在 Flutter 上的一些实践 开眼快创 是围绕商业化广告创意构建的一款产品 目标人群涵盖供应商 代理商 广告主 商家号 视频行业从业者等 产品目标是提供智能化生产素
  • qnyutils工具库是基于纯JavaScript开发的,后续会扩展支持typescript。

    官网地址 qnyutils npm 介绍 前端项目开发常用js工具类 包括手机号码 身份证验证 中文校验 获取日期和根据日期格式获取日期或者转换日期格式 对象数组根据key分组 邮箱格式校验 获取历史时间 时间差 数组去重 多个对象数组去重
  • 【markdown 使用】

    这里写自定义目录标题 23232 欢迎使用Markdown编辑器 新的改变 功能快捷键 合理的创建标题 有助于目录的生成 如何改变文本的样式 插入链接与图片 如何插入一段漂亮的代码片 生成一个适合你的列表 创建一个表格 设定内容居中 居左
  • 2021年软件测试工具总结——测试管理工具

    每个软件研发团队都会搭建一套测试管理系统 由至少一个测试管理工具组成 用来管理各种测试活动 覆盖了整个测试过程 一个测试管理系统的构成如下所示 图片来源 全程软件测试 第14章 测试管理系统的核心是测试用例库和缺陷库 围绕测试用例的管理包括
  • MATLAB强化学习实战(十二) 创建自定义强化学习算法的智能体

    创建自定义强化学习算法的智能体 创建环境 定义策略 自定义智能体类 智能体属性 构造函数 相关函数 可选功能 创建自定义智能体 训练自定义智能体 自定义智能体仿真 本示例说明如何为您自己的自定义强化学习算法创建自定义智能体 这样做使您可以利
  • 服务器收不到客户端消息,java - 服务器没有收到来自客户端的消息(reader.readLine()== null?)...

    所以我一直在做一个简单的聊天 比有一台服务器和一群客户端连接到它们 在客户端 我有类ConnectionManager来管理创建套接字等 这是它的核心方法 java 服务器没有收到来自客户端的消息 reader readLine null
  • 目标检测新范式!港大同济伯克利提出Sparse R-CNN

    Sparse R CNN End to End Object Detection with Learnable Proposals 作者单位 港大 同济大学 字节AI Lab UC伯克利 沿着目标检测领域中Dense和Dense to Sp
  • java char与int互相转换

    1 int转char 将数字加一个 0 并强制类型转换为char 2 char转int 将字符减一个 0 即可 public class a public static void main String args System out pr
  • 【java】使pagehelper分页与mybatis-plus分页兼容存在

    问题 原先的功能接口都无法保存 出现如下错误 net sf jsqlparser statement select SetOperationList cannot be cast to net sf jsqlparser statement
  • 一张图告诉你,MES系统是什么

    MES系统 就要说到生产 涉及到人 钱 货 信息等资源 产 供 销 还有供应商 客户 合作伙伴 其中 产 就是生产 而生产管理就是通过对生产系统的战略规划 组织 指挥 实施 协调和控制 实现生产系统的物质转化 产品生产和价值提升的过程 擅长
  • 解决Python OpenCV 读取视频并抽帧出现error while decoding的问题

    解决Python OpenCV 读取视频抽帧出现error while decoding的问题 1 问题 2 解决 3 源代码 参考 1 问题 读取H264视频 抽帧视频并保存 报错如下 aac 00000220b9a07fc0 Input
  • 华为OD机试 - 火星文计算(Java)

    目录 题目描述 输入描述 输出描述 用例 题目解析 算法源码 题目描述 已知火星人使用的运算符为 其与地球人的等价公式如下 x y 2 x 3 y 4 x y 3 x y 2 其中x y是无符号整数 地球人公式按C语言规则计算 火星人公式中
  • Work with shaders and shader resources

    It s time to learn how to work with shaders and shader resources in developing your Microsoft DirectX game for Windows 8
  • 如何输出*.ply文件

    所谓ply文件格式 是由斯坦福大学开发的一套三维mesh模型数据格式 图形学领域内很多著名的模型数据 比如斯坦福的三维扫描数据库 其中包括很多文章中会见到的Happy Buddha Dragon Bunny兔子 最初的模型都是基于这个格式的