当前位置:网站首页>[scientific research notes] about using the downsampling multiple of openslide cut
[scientific research notes] about using the downsampling multiple of openslide cut
2022-06-22 04:48:00 【The growth of carp King】
【 Research Notes 】 About use openslide The downsampling multiple of the tangent graph
background
Medical images are huge , We call the whole picture WSI, That is to say whole slide image. We can't use such a large graph in actual processing , So we usually use small ones patch, these patch It is cut from the original picture .
For the convenience of narration , We assume that there is a (h, w) Big picture of .
level What is it?
When cutting a picture, we first involve a level The problem of . If it is level 0, So let's go straight to this (h, w) On the picture of . If it is level 1, So we are (h/downsample_factor, w/downsample_factor) This graph cuts up , In other words, the big picture was first reduced . If it is level 2, The size of the graph becomes [h/(downsample_factor^2), w/(downsample_factor^2)], That is to say, it is further reduced . That is to say, the graph will be adjusted to [h/(downsample_factor^level), w/(downsample_factor^level)].
Okay , that level and downsample_factor What is the relationship ? We might as well look at . Reading medical images generally uses openslide This package , The code is as follows .
slide = openslide.open_slide(str(filename))
slide Is an instantiated object , Let's take a look at its properties slide.level_downsamples. This is actually a list , In this example , The list is [1.0, 4.0, 16.0, …], in other words , This is the difference level Down sampling multiples .level=0 When ,downsample_factor yes 1.0,level=1 When ,downsample_factor yes 4.0. Yes, of course , In different situations , The numbers in this list are not necessarily the same , We should make a concrete analysis according to the specific situation , And use slide.level_downsamples Check to confirm .
Tangent process
Take the first step and zoom in , Then cut the picture . We can set patch Size , such as 256, So all the pictures we cut out are 256*256. If we want to overlap, Then adjust the step size , For example, when there is no overlap, the step length and patch equally , Follow the example just now , That's it 256 Step size of . When it's all done , I want to have a look resize, That is to say, in the end, we should patch Zoom to how big .
preservation
Because there are coordinates in the picture name , So we have to know exactly what this coordinate is . In general , We can find the part of the coordinate definition .
row_cords = np.arange(0, w, args.stride * downsample_factor)
col_cords = np.arange(0, h, args.stride * downsample_factor)
It's not hard to see. , The coordinates are the original coordinates , Without any scaling , We should use appropriate coordinates according to our own needs .
边栏推荐
- Researcher of Shangtang intelligent medical team interprets organ image processing under intelligent medical treatment
- Kotlin project reports an error and lacks coroutinecontext dependency
- [从零开始学习FPGA编程-39]:进阶篇 - 语法-硬件模块的单元测试:仿真激励、testbench
- cadence allegro 17. X conversion tool for downgrading to 16.6
- mysql笔记
- How much does it cost to buy a fixed-term life insurance with an insured amount of 500000 at the age of 42? Is there any product recommendation
- 【sdx62】QCMAP_CLI手动拨号操作说明
- IDS interview questions collection data structure + penetration avalanche + persistence + memory elimination strategy + database double write + Sentinel
- Mongo Fuzzy query, with Special Characters need to escape, to Query
- QML控件类型:SwipeView、PageIndicator
猜你喜欢

软考2022年下半年考试科目安排

Zhongmin online: sharing online channel resources with "points" as the link

Why does golang not recommend this/self/me/that/_ this

Knowledge points used in MVC project development (mvccontrib separates asp.net MVC project)

WPF DataContext usage (2)

网页设计与制作期末大作业报告——动画家宫崎骏

网页设计与制作期末大作业报告——大学生线上花店

Systematic arrangement | how many children's shoes have forgotten to be done carefully before the model development (practical operation)

10道不得不会的 Redis 面试题

基于深度学习的目标检测算法面试必备(RCNN~YOLOv5)
随机推荐
Calculation of audio frame size
【故障诊断】切图代码切不出来,slide.read_region不运行,但程序不报错
Es cannot work, circuitbreakingexception
MySQL common SQL
103.简易聊天室6:使用 Socket 通信
Kotlin项目报错缺少CoroutineContext依赖
[sdx62] IPA log fetching instructions
【使用指南】清华源的使用
What is the value of the FC2 new domain name? How to resolve to a website?
Golang为什么不推荐使用this/self/me/that/_this
About SSM integration, this is enough ~ (nanny level hands-on tutorial)
Importbeandefinitionregistrar registers beans with the container
Odoo Development Manual (I) the second day of contact with odoo
中闽在线:以“积分”为纽带 共享线上渠道资源
系统整理|这个模型开发前的重要步骤有多少童鞋忘记细心做好(实操)
Lightweight CNN design skills
Take you to develop an efficiency enhancing tool -- vscode plug-in
Reasons and Countermeasures for ThinkPHP's session being unable to obtain session in different ways in the same controller
Popular science of source code encryption technology
MySQL notes