小编zen*_*vil的帖子

如何从 numpy rgb 数组和深度数组创建 rgbd 图像?

我有一个 numpy 数组,它是形状(高度,宽度,3)的彩色图像“img”,也是形状(高度,宽度)的深度 numpy 数组。我想创建一个 RGBD 图像并显示它,为此我正在执行以下操作:

o3d.geometry.RGBDImage.create_from_color_and_depth(img, depth)
Run Code Online (Sandbox Code Playgroud)

但我收到错误:

TypeError: create_from_color_and_depth(): incompatible function arguments. The following argument types are supported:
    1. (color: open3d.open3d_pybind.geometry.Image, depth: open3d.open3d_pybind.geometry.Image, depth_scale: float = 1000.0, depth_trunc: float = 3.0, convert_rgb_to_intensity: bool = True) -> open3d.open3d_pybind.geometry.RGBDImage

Run Code Online (Sandbox Code Playgroud)

如何解决这个问题?如果需要Image类型,那么如何将numpy数组转换为Image类型?

即使我将 numpy 数组传递到 o3d.geometry.Image 构造函数中,如下所示:

o3d.geometry.RGBDImage.create_from_color_and_depth(o3d.geometry.Image(img), o3d.geometry.Image(depth))
Run Code Online (Sandbox Code Playgroud)

我收到错误:

TypeError: create_from_color_and_depth(): incompatible function arguments. The following argument types are supported:
    1. (color: open3d.open3d_pybind.geometry.Image, depth: open3d.open3d_pybind.geometry.Image, depth_scale: float = 1000.0, depth_trunc: float = 3.0, convert_rgb_to_intensity: bool = True) -> open3d.open3d_pybind.geometry.RGBDImage

Run Code Online (Sandbox Code Playgroud)

如何解决这个问题并从 …

python arrays numpy open3d

10
推荐指数
1
解决办法
8837
查看次数

已请求 X11 转发但未设置 DISPLAY

我想在连接到 Jetson Xavier nx 的 macOS 上启用 x11 转发。但是,连接后:

sudo ssh -Xvvv id@host
Run Code Online (Sandbox Code Playgroud)

连接建立成功。但在详细日志中,我得到以下信息:

debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 52
debug1: Authentication succeeded (password).
Authenticated to proto1 ([192.168.1.106]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: exec
debug3: receive packet: type 80 …
Run Code Online (Sandbox Code Playgroud)

x11 ubuntu nvidia-jetson

9
推荐指数
2
解决办法
3万
查看次数

使用 boto3 从 was s3 存储桶下载文件时没有此类文件或目录

我想从aws s3存储下载整个存储桶“my-bucket”,并将其保存在路径“./resources/my-bucket”中。因此,我正在执行以下操作,导入 boto3,使用 access_key_id 和 Secret_access_key 创建资源,然后迭代存储桶中的所有对象并使用 download_file api 调用下载它们:

import boto3
s3 = boto3.resource(
service_name="s3",
region_name="us-west-1",
aws_access_key_id="AWUHWIEDFB",
aws_secret_access_key="AOIERJGOERWHJO"
)

for o in s3.Bucket("my-bucket").objects.all():
    filename = o.key
    s3.Bucket("my-bucket").download_file(Key=filename, Filename="./resources/my-bucket/" + filename)
Run Code Online (Sandbox Code Playgroud)

s3 存储桶 my-bucket 本身有一个名为“input”的文件夹,其中仅包含 png 和 jpg 文件,并且根路径中还有另一个 .pt 文件。

但我收到错误:

FileNotFoundError: [Errno 2] No such file or directory: './resources/my-bucket/input/.F89bdcAc'
Run Code Online (Sandbox Code Playgroud)

我不知道 .F89bdcAc 是什么意思,也不知道为什么 boto3 试图找到该文件。

如何解决这个问题?

amazon-s3 amazon-web-services boto3

7
推荐指数
1
解决办法
1万
查看次数

MongooseError:操作“featureds.find()”缓冲在 10000 毫秒后超时

我在 MongoDB 上有一个集合,我尝试使用以下方法从中查询所有元素find()

const mongoose = require('mongoose');
const Featured = mongoose.model('featured');
module.exports = app => {
    app.get('/api/featured', async (req, res) => {
      console.log("featured route");
      const featured = await Featured.find();
      console.log(featured);
      res.send(featured);
    })
}

Run Code Online (Sandbox Code Playgroud)

这是Featured.js:

const mongoose = require('mongoose');
const { Schema } = mongoose;

const featuredSchema = new Schema({});

mongoose.model('featured', featuredSchema);
Run Code Online (Sandbox Code Playgroud)

但是,我在发出请求时收到错误:

(node:75568) UnhandledPromiseRejectionWarning: MongooseError: Operation `featureds.find()` buffering timed out after 10000ms
    at Timeout.<anonymous> (/Users/prikshetsharma/Desktop/humboiserver/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:184:20)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)
(node:75568) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error …
Run Code Online (Sandbox Code Playgroud)

javascript mongoose mongodb node.js

7
推荐指数
1
解决办法
2万
查看次数

重复的输出文件

我正在尝试使用该命令运行 react-native 项目,react-native run-ios但出现以下错误:

Build system information
error: Multiple commands produce '/Users/prikshetsharma/Library/Developer/Xcode/DerivedData/Humboi-hjbrwqprmopoeybrdkwevgblfvis/Build/Products/Debug-iphonesimulator/Humboi.app/EvilIcons.ttf':
1) Target 'Humboi' (project 'Humboi') has copy command from '/Users/prikshetsharma/Desktop/Humboi/node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf' to '/Users/prikshetsharma/Library/Developer/Xcode/DerivedData/Humboi-hjbrwqprmopoeybrdkwevgblfvis/Build/Products/Debug-iphonesimulator/Humboi.app/EvilIcons.ttf'
2) That command depends on command in Target 'Humboi' (project 'Humboi'): script phase “[CP] Copy Pods Resources”


Build system information
error: Multiple commands produce '/Users/prikshetsharma/Library/Developer/Xcode/DerivedData/Humboi-hjbrwqprmopoeybrdkwevgblfvis/Build/Products/Debug-iphonesimulator/Humboi.app/Entypo.ttf':
1) Target 'Humboi' (project 'Humboi') has copy command from '/Users/prikshetsharma/Desktop/Humboi/node_modules/react-native-vector-icons/Fonts/Entypo.ttf' to '/Users/prikshetsharma/Library/Developer/Xcode/DerivedData/Humboi-hjbrwqprmopoeybrdkwevgblfvis/Build/Products/Debug-iphonesimulator/Humboi.app/Entypo.ttf'
2) That command depends on command in Target 'Humboi' (project 'Humboi'): script phase “[CP] Copy Pods Resources” …
Run Code Online (Sandbox Code Playgroud)

xcode ios react-native

1
推荐指数
1
解决办法
1983
查看次数