我有个目标:
public class Species : IEntity<int>
{
public int Id { get; set; }
public string Name { get; set; }
public SpeciesCategory Category { get; set; }
public WetlandIndicator WetlandIndicator { get; set; }
}
public class SpeciesCategory : IEntity<int>
{
public
我对R相当陌生,当我试图计算缓冲区内每种湿地类型的面积时,我都会遇到错误。当我试图按湿地类型对数据进行分组并总结该区域时,我会收到错误的UseMethod () no applicable method for 'group_by' applied to an object of class c(SpatialPolygonsDataFrame).,如何解决这个问题?
library(tidyverse)
library(rgeos)
library(tidyr)
library(sf)
Neosho_wetlands<- readOGR("HU8_110702
我想问你关于Watershed3D的事。我尝试了这个页面中的https://www.kaggle.com/kmader/itk-watershed-to-label-bubbles算法,也使用了他们的数据集 def apply_watershed(in_vol,
threshold = 0.01,
level = 0.5):
#(A rule of thumb is to set the Threshold to be about 1 / 100 of the Level.)
Dimensio
我使用分水岭分割来检测触摸对象,它工作得很好。现在,我想画出每个物体的轮廓,这样我就可以得到它们的长度、面积、矩等。但是分割结果中的对象仍然是接触的。所以,我没能画出每一个人的轮廓。如何绘制每个物体的轮廓?
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace std;
using namespace cv;
int main()
{
Mat src = imread(
我正在做分水岭分割,标记图像是从经过距离变换的源图像中派生出来的。距离转换返回一个浮点图像(我不知道位深度),我很难将它放入分水岭方法,因为它需要32位的单通道图像。
是否可以使用mat的convertTo方法将位深度设置为32?我在尝试显示浮点图像时也遇到了问题,因为matToBitmap()方法似乎不接受它们。(在Android中)
Mat mImg = new Mat();
Mat mThresh = new Mat();
Mat mDist = new Mat();
ImageView imgView = (ImageView) findViewById(R.id.imageView
我感兴趣的是使用分水岭算法分离图像上的特征。使用matlab教程,我试图写一个原理的小证明算法,我可以进一步使用在我的图像分析。
Im = imread('../../Pictures/testrec.png');
bw = rgb2gray(Im);
figure
imshow(bw,'InitialMagnification','fit'), title('bw')
%Compute the distance transform of the complement of the binary image.
D = bwdis
我有一个图像,并希望创建多边形的片段,这个图像使用标记控制的分水岭。我编写了以下代码,但无法分离彼此连接的对象并创建对象的多边形。
如何解决这些问题?非常感谢你的帮助。
import cv2
import numpy as np
import scipy.misc
import scipy.ndimage as snd
# image is read and is converted to a numpy array
img = cv2.imread('D:/exam_watershed/Example_2_medicine/Medicine_create_poly/medicine.
我有一个二进制位的细胞图像。我想用python单独地分离这些细胞。每个单元格将保存在一个图像中。例如,我有1000个单元格,然后输出1000个图像,每个图像包含一个单元格。目前,我使用两种方法来获得它,但是输出是错误的。
from skimage.morphology import watershed
from skimage.feature import peak_local_max
from skimage import morphology
import numpy as np
import cv2
from scipy import ndimage
from skimage impor
我尝试了下面的。这应该显示图像处理的结果。
from scipy import ndimage as ndi
import matplotlib.pyplot as plt
from scipy import misc
import numpy as np
import cv2
from skimage.morphology import watershed, disk
from skimage import data
from skimage.filters import rank
from skimage.util import img_as_ubyte
from skimage im
我想从streamstats函数delineateWatershed()创建一个sf()对象,而不需要首先保存为json的shapefile。我可以描绘多边形,然后保存为形状,最后作为shapefile导入。这使得我在一个嵌套的文件夹中留下了一个形状文件的版本,这将很快占用空间。一旦我有了我的sf()多边形,我计划将多个合并在一起,并将它们保存为单个shapefile。最后,我将拥有多边形的两个副本。如何跳过writeShapefile()然后执行st_read步骤? setwd('~/R/GIS/data/') #I need to define the working d
我试着通过水力压裂的用水量来填满流域。我有数据集(Well_watershed_ok)和变量(H2O_BBL_T)。每个分水岭都有一个值。这就是我使用的代码。
ggplot() +
geom_polygon(data = well_watershed_ok, aes(x = long, y = lat),
fill = well_watershed_ok$H2O_BBL_T) +
labs(x = "", y = "", title = "Number of Barrells of Water used per Day
我正在用skimage.segmentation.watershed分割一些粒子。这是很好的工作,我设法把它们分开(见图)。。然而,当我使用ndi.label标记不同的区域时,并不是所有的片段都被分开,有些片段被分配给相同的标签(即使分水岭它们被正确分割)(例如,图2,左上角粒子) 。我在Python方面相对较新,不知道我还能尝试解决什么问题。如果你能帮我什么忙,我会很感激的。(预先谢谢:)
我正在使用的代码是(由于我想要自动化同时分析几幅图像的过程,所以我将它放在for循环中):
#import hyperspy for reading directly ser or emd files
i
我在将分水岭分割后的图像存储为二值图像时遇到了问题。当我用cmap=plt.cm.gray绘制分割图时,它显示了一个二进制图像,但我不知道如何存储该图像(不显示它)。
import cv2
import numpy as np
from matplotlib import pyplot as plt
from skimage.morphology import watershed
from scipy import ndimage as ndi
from skimage import morphology
from skimage.filters import sobel
from skima
如图所示,我想用分水岭算法来分离相邻的细胞,但结果显示过度分割。我该如何使用imimposemin()来解决这个问题。谢谢!
WATESHED CODE in MATLAB:
D = -bwdist(~BW);
D(~BW) =-Inf;
L = watershed(D,8);
BW(L==0)=0;