Moving the Origin

AI视频生成与音乐合成,批量制作体育短视频的完整流程拆解 AI视频生成技术正快速改变短视频生产方式,其核心原理是通过图生视频、姿态控制与首尾帧约束,让模型自动补全连续动作。音乐生成同样基于提示词驱动,可产出节奏明确的原创配乐。将两者结合,再借助视频合成工具实现画面与节拍的精准对齐,便能构建一条从素材生成、批量出片到接口调用的自动化管线。这类技术广泛应用于体育娱乐、营销与个人创作领域,尤其适合制作球星技巧混剪、高光集锦等节奏感强的短视频。然而真实人物肖像与音乐版权是必须遵守的边界,使用虚拟人物形象与原创AI音乐可规避风险。本文以“Neymar prime skill 阅读详情
 

Moving the Origin

By default, a device context's origin is in the upper left corner of the display surface. Even if you change the mapping mode, the origin remains in the upper left corner. But just as you can change the mapping mode, you can also move the origin. MFC's CDC class provides two functions for moving the origin. CDC::SetWindowOrg moves the window origin, and CDC::SetViewportOrg moves the viewport origin. You'll normally use one but not both. Using both can be very confusing.

Suppose you'd like to move the origin to the center of the window so that you can center what you draw by centering your output around the point (0,0). Assuming that dc is a device context object, here's one way to do it:

CRect rect;
GetClientRect (&rect);
dc.SetViewportOrg (rect.Width () / 2, rect.Height () / 2);

Here's another way to accomplish the same thing, assuming that you're working in the MM_LOENGLISH mapping mode:

CRect rect;
GetClientRect (&rect);
CPoint point (rect.Width () / 2, rect.Height () / 2);
dc.SetMapMode (MM_LOENGLISH);
dc.DPtoLP (&point);
dc.SetWindowOrg (-point.x, -point.y);

It's easy to get SetViewportOrg and SetWindowOrg confused, but the distinction between them is actually quite clear. Changing the viewport origin to (x,y) with SetViewportOrg tells Windows to map the logical point (0,0) to the device point (x,y). Changing the window origin to (x,y) with SetWindowOrg does essentially the reverse, telling Windows to map the logical point (x,y) to the device point (0,0)—the upper left corner of the display surface. In the MM_TEXT mapping mode, the only real difference between the two functions is the signs of x and y. In other mapping modes, there's more to it than that because SetViewportOrg deals in device coordinates and SetWindowOrg deals in logical coordinates. You'll see examples of how both functions are used later in this chapter.

As a final example, suppose you're drawing in the MM_HIMETRIC mapping mode, where 1 unit equals 1/100 of a millimeter, positive x points to the right, and positive y points upward, and you'd like to move the origin to the lower left corner of the window. Here's an easy way to do it:

CRect rect;
GetClientRect (&rect);
dc.SetViewportOrg (0, rect.Height ());

Now you can draw with positive x and y values using coordinates relative to the window's lower left corner.

A Final Word on Coordinate Systems

When you talk about mapping modes, window origins, viewport origins, and other idioms related to the GDI's handling of coordinates, it's easy to get tangled up in the terminology. Understanding the difference between the device coordinate system and the logical coordinate system might help clear some of the cobwebs.

In the device coordinate system, distances are measured in pixels. The device point (0,0) is always in the upper left corner of the display surface, and the positive x and y axes always point right and downward. The logical coordinate system is altogether different. The origin can be placed anywhere, and both the orientation of the x and y axes and the scaling factor (the number of pixels that correspond to 1 logical unit) vary with the mapping mode. To be precise, they vary with the window extents and the viewport extents. You can change these extents in the MM_ISOTROPIC and MM_ANISOTROPIC mapping modes but not in the other mapping modes.

You'll sometimes hear Windows programmers talk about "client coordinates" and "screen coordinates." Client coordinates are simply device coordinates relative to the upper left corner of a window's client area. Screen coordinates are device coordinates relative to the upper left corner of the screen. You can convert from client coordinates to screen coordinates and vice versa using the CWnd::ClientToScreen and CWnd::ScreenToClient functions. Why these functions are useful will become apparent to you the first time you call a Windows function that returns screen coordinates and you pass them to a function that requires client coordinates, or vice versa.

Getting Information About a Device

Sometimes it's helpful to get information about a device before you send output to it. The CDC::GetDeviceCaps function lets you retrieve all kinds of information about a device, from the number of colors it supports to the number of pixels it can display horizontally and vertically. The following code initializes cx and cy to the width and height of the screen, in pixels:

CClientDC dc (this);
int cx = dc.GetDeviceCaps (HORZRES);
int cy = dc.GetDeviceCaps (VERTRES);

If the screen resolution is 1,024 by 768, cx and cy will be set to 1,024 and 768, respectively.

The table below lists some of the parameters you can pass to GetDeviceCaps to acquire information about the physical output device associated with a device context. How you interpret the results depends somewhat on the device type. For example, calling GetDeviceCaps with a HORZRES parameter for a screen DC returns the screen width in pixels. Make the same call to a printer DC and you get back the width of the printable page, once more in pixels. As a rule, values that imply any kind of scaling (for example, LOGPIXELSX and LOGPIXELSY) return physically correct values for printers and other hardcopy devices but not for screens. For a 600 dpi laser printer, both LOGPIXELSX and LOGPIXELSY return 600. For a screen, both will probably return 96, regardless of the physical screen size or resolution.

Interpreting the color information returned by the NUMCOLORS, BITSPIXEL, and PLANES parameters of GetDeviceCaps is a bit tricky. For a printer or a plotter, you can usually find out how many colors the device is capable of displaying from the NUMCOLORS parameter. For a monochrome printer, NUMCOLORS returns 2.

Useful GetDeviceCaps Parameters

Parameter Returns
HORZRES Width of the display surface in pixels
VERTRESHeight of the display surface in pixels
HORZSIZEWidth of the display surface in millimeters
VERTSIZEHeight of the display surface in millimeters
LOGPIXELSX Number of pixels per logical inch horizontally
LOGPIXELSY Number of pixels per logical inch vertically
NUMCOLORS For a display device, the number of static colors; for a printer or plotter, the number of colors supported
BITSPIXEL Number of bits per pixel
PLANES Number of bit planes
RASTERCAPS Bit flags detailing certain characteristics of the device, such as whether it is palettized and whether it can display bitmapped images
TECHNOLOGYBit flags identifying the device type—screen, printer, plotter, and so on

However, the color resolution of the screen (the number of colors that can be displayed onscreen simultaneously) is computed by multiplying BITSPIXEL and PLANES and raising 2 to the power of the result, as demonstrated here:

CClientDC dc (this);
int nPlanes = dc.GetDeviceCaps (PLANES);
int nBPP = dc.GetDeviceCaps (BITSPIXEL);
int nColors = 1 << (nPlanes * nBPP);

If this code is executed on a PC equipped with a 256-color video adapter, nColors equals 256. Calling GetDeviceCaps with a NUMCOLORS parameter, meanwhile, returns not 256 but 20—the number of "static colors" that Windows programs into the video adapter's color palette. I'll have more to say about the color characteristics of screens and video adapters and also about static colors in Chapter 15.

I'll use GetDeviceCaps several times in this book to adapt the sample programs' output to the physical attributes of the output device. The first use will come later in this chapter, when the screen's LOGPIXELSX and LOGPIXELSY parameters are used to draw rectangles 1 logical inch long and 1/4 logical inch tall in the MM_TEXT mapping mode.

itk itk::BSplineDeformableTransform itk::BSplineDeformableTransform:可以实现变形配准 【在ITK_VERSION_MAJOR >4 后变成itk::BSplineTransform】 代码链接:(SphinxExamples/src/Core/Transform/GlobalRegistrationTwoImagesBSpline/Code.cxx) https://itk.org/Doxygen/html/SphinxExamples_2src_2Core_2Transform_2Gl.. 阅读详情

相关推荐

SimpleITK医疗影像预处理:从DICOM到可训练3D张量的四步铁律

医学影像是带有物理空间语义的三维数据,其核心在于像素在解剖坐标系中的精确定位,而非普通图像的视觉表达。SimpleITK作为ITK的Python封装,专为保留Direction方向矩阵、Spacing体素尺寸和Origin空间原点这三大元数据而设计,解决了NumPy和OpenCV在DICOM处理中丢失HU值、层厚信息与坐标对齐能力的根本缺陷。它支撑CT/MRI/PET等多模态数据的物理校正、各向异性重采样与BIDS兼容导出,是构建可复现、可临床验证的AI模型(如3D U-Net)不可或缺的工程基座。本文聚焦

hintcnuie 493

大家都想知道我是如何全自动批量生成短视频?

需要注意的是,由于短视频自动生成算法仅能根据一定规则准确预测并生成视频素材,因此在生成视频的过程中,必要的后期处理和人工干预仍然是必要的。因此,在使用自动批量生成短视频技术时,需要结合人工智能、视频制作和后期处理技术,并加以适当的优化和改进,以满足用户需求和提高内容质量。4. AI技术生成短视频:使用目前越来越先进的AI技术,通过人工智能训练模型,自动生成满足用户需求的短视频,尤其是那些一些重复性较强的视频制作,例如背景分割、合成等。2. 收集素材:收集视频素材是生成短视频的一大要素。

XIAOERMAI小而麦的博客——小品牌,大世界,未来大有可为! 2154

【实战】如何使用DeepSeek批量创作短视频

小白如何使用deepseek上手、紧接短视频创作,迅速起号,批量生产

kakaZhui的博客 2万+

一次性剪辑大量视频的教程,逻辑讲解,很实用

超级编导除了脚本创作、批量剪辑外,还可以进行矩阵分发,支持抖音、小红书、视频号、快手、千川、淘宝光合六大平台的视频分发,以及抖音扫码分发,想要深入了解的朋友可以进入超级编导官网进行深入了解,也可以添加产品顾问获取更加详细的远程演示和讲解,还可以进行免费上机试用。如果是网络素材,也可以直接复制链接,快速导入素材,同时可以之际去掉视频中的水印,然后,还具备AI字幕擦除、AI智能拆分、自动切片、人声分离等各种便利的功能,助力我们高效剪辑。在对话框中输入你的文案需求,然后就可以得到心仪的脚本文案。

ronver的专栏 1008

『杭电1329』Hanoi Tower Troubles Again!

Problem Description You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the same name by Stanley Kubrick. In it a spaceship is sent from Earth to Saturn. The crew is put into stasis for the long flight, only two me

漠宸离若的博客 617

从 Product Master 的 Costing 视图看懂 SAP 标准成本与估价数据的衔接

SAP S/4HANA物料主数据中的Costing视图与Accounting视图存在字段重叠现象,这反映了SAP成本管理的多模块协同机制。核心要点包括: 工厂级估价是Costing视图的基础,确保不同工厂可维护独立成本结构; Costing视图包含可配置参数和只读结果两类数据,标准成本需通过专用事务码维护; Accounting与Costing视图共享估价数据,体现财务与成本控制的协同; 价格控制类型(S/V)是连接成本核算与库存估价的关键桥梁; 成本核算批量等参数直接影响成本计算逻辑,不能随意填写。 这些

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 788

短视频人必看!这个神器让你 1 天搞定 100 条爆款

例如,可设置在一天中的不同时间段,将视频依次发布到不同账号组,模拟人工自然发布的节奏,有助于提升账号的权重和视频的曝光效果。在海量的短视频内容中,如何让自己的视频更容易被用户搜索到至关重要。当用户在平台上搜索相关关键词时,经过 SEO 优化的视频就有更大的机会展示在搜索结果的前列,从而吸引更多潜在用户点击观看,实现更精准的客户锁定,有效提高视频的曝光度和播放量。创作者可将与视频主题相关的图片上传至系统,在剪辑视频时,将这些图片灵活添加到视频的合适位置,作为视频的背景、装饰元素或用于强调关键信息。

qwerasdfqqcjj的博客 499

BCIC IV 2a数据集实战:从MATLAB导入到EEG信号分析全流程

本文提供了BCIC IV 2a数据集从MATLAB导入到EEG信号分析的完整实战流程。详细解析了数据集结构,区分了EEG与EOG信号,并演示了信号可视化、基础预处理(滤波、分段、基线校正)等关键步骤,帮助脑机接口研究者快速上手处理这一经典运动想象数据集。

weixin_29047919的博客 477

怎么批量生成100多条短视频素材

怎么批量生成100多条短视频素材#批量#生成#短视频 一天如何能生产出100条好无分享的视频,人家一天能做出百来条视频发抖音挂下黄车赚钱,你一天做两条视频就已经累到不行了,所以今天我把这些压箱底的方法告诉大家,看到的朋友请收藏起来,方便下一次学习,不然等我删掉你就找不到了哦 你可能就看不到了,在抖音里面有一个小技巧,一定要学会用起来,打开企业服务中心,点击涨流量,点击创作者工具,点击智能。 然后点击这里说出你想要的标题,他能一次帮你生产上传9条不一样的视频。 而且不需要添加音乐。

eb198710的博客 1365

火车头采集器超级详细图文使用指导(面向新手)

火车采集器·超级详细使用指导

DE的个人原创笔记 1万+

GitHub工业级开源利器:StreamPipes如何简化工业物联网数据分析

Apache StreamPipes是一款GitHub上的工业级开源利器,旨在简化工业物联网数据分析。它通过图形化界面连接各类工业协议数据源,以拖拽方式构建流处理管道,并实现实时可视化,有效降低了数据分析的技术门槛,让业务人员也能自助完成从数据接入到洞察的全流程。

weixin_29279153的博客 208

Moving the Origin (转)

Moving the Origin (转)[@more@] Moving the Origin By default, a device context's origin is in the upper left cor...

csd3176的博客 100

Python-uiautomator2保姆级安装指南:从环境配置到设备连接全流程

本文提供Python-uiautomator2的保姆级安装指南,涵盖从环境配置到设备连接的全流程。详细介绍了Python 3.6+、ADB工具等核心组件的准备,以及uiautomator2的安装和设备端服务初始化步骤,帮助开发者快速搭建Android自动化测试环境,避免常见问题。

nnn11的博客 942

读 uBlock Origin 的 CHANGELOG:从 1.54 到 1.73 的过滤引擎演进路线图

[CHANGELOG.md](https://link.gitcode.com/i/567f1ad20a25be8d549bcff4bdc6446e) 是 uBlock Origin 仓库中一份按版本倒序组织的变更日志,覆盖 1.54.0 至 1.73.0 的全部发布,外加文件顶部尚未归入版本号的开发中条目。读完本文,你能掌握三件事:uBlock Origin 静态网络过滤引擎在近两年新增的每个关

gitblog_00330的博客 670

Windows 11 系统部署 OpenClaw 完整指南:从零到一的 AI 助手搭建

OpenClaw(昵称“小龙虾”)是一款开源 AI 代理工具,定位为“AI 指挥官”,能够接收指令、调用工具并自动化处理任务。它支持对接国内外多款大模型,所有数据本地存储,兼顾实用性与安全性。本文将详细介绍在 Windows 11 系统上部署 OpenClaw 的完整流程。OpenClaw 在 Windows 11 上的部署虽然有一定技术门槛,但按照本文的步骤操作,大多数用户都能顺利完成安装。环境准备是基础:确保 Node.js ≥22 版本,使用管理员权限操作安装方式灵活选择。

weixin_41484939的博客 804

YOLOv13|损失函数优化篇:Focal EIOU 保持良好性能的同时,提供更高效的计算和更稳定的训练过程-包源码

Focal IoU与EIoU:目标检测中的损失函数优化 摘要:本文深入探讨了目标检测中两种重要的边界框回归损失函数优化方法。Focal IoU借鉴Focal Loss思想,通过(1-IoU)^γ因子调节损失权重,使模型更关注难样本(低IoU预测框),有效解决了传统IoU Loss对难易样本权重相同的问题。EIoU则在CIoU基础上改进,通过简化长宽比计算、分离宽高损失项,提升了计算效率和训练稳定性。两种方法分别从样本权重分配和损失函数结构优化角度,显著提升了目标检测性能,为实际应用提供了更高效的解决方案。文

FJN110的博客 1865

ITK配准踩坑

卡了挺久的东西终于弄好了 fixed与moving 得到的transform是把fixed的点映射到moving点的变换 仿射变换 仿射变换可以由matrix、center、translation确定,也可以由matrix、offset确定。 itk中observer输出的transform的matrix和offset是在世界坐标系下。 坐标系 世界坐标系: 图像坐标系:都是正整数,就是像素的index,可以由(世界坐标 - origin)/spacing得到 物理坐标系(?不知道是不是叫这个):图像坐

ziggy7的博客 1135

Trustzone/TEE/安全 面试100问-目录

关键词:cache学习、mmu学习、cache资料、mmu资料、arm资料、armv8资料、armv9资料、 trustzone视频、tee视频、ATF视频、secureboot视频、安全启动视频、selinux视频,cache视频、mmu视频,armv8视频、armv9视频、FF-A视频、密码学视频、RME/CCA视频、学习资料下载、免费学习资料、免费 周贺贺,baron,代码改变世界ctw,Arm精选, 资深安全架构专家,十年手机安全/SOC底层安全开发经验。擅长trustzone/tee安全产品的设计

baron-周贺贺-代码改变世界ctw 653

CANN/CATLASS TLA布局设计

This document introduces `Layout` in Tensor Layout Abstraction (TLA). If a Tensor is viewed as a logical multi-dimensional array, then `Layout` is responsible for answering the following questions:

gitblog_00453的博客 340

Android AVB 分析(十六)5 个例子彻底理解 FEC(Reed-Solomon) 的工作原理

关于 FEC 是如何工作的,一直是我 Android OTA 讨论群中的未解话题,大家基本上都不清楚 Android 上面的 FEC 是如何工作的,为什么在 OTA 升级的最后阶段,FEC 的编码计算会消耗大量的 IO 资源,并持续很长时间。接下来的几篇,我会从一个程序员的角度,演示基于里德所罗门编码的 FEC 到底是如何工作的。

洛奇看世界 674

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

SimpleITK医学影像处理核心原理与工业级实践指南

医学影像计算的本质是空间语义建模,而非普通数组操作。SimpleITK将图像抽象为带物理坐标系(origin/spacing/direction)的数学实体,通过内置坐标系管理引擎解决DICOM/NIfTI方向错乱、多模态配准矩阵失真、PyTorch加载内存爆炸等工程痛点。其设计哲学强调‘空间一致性即契约’,在重采样、配准、ROI提取等关键环节自动维护毫米级几何精度,避免nibabel等工具因affine手动解析导致的±0.3mm级临床不可接受误差。广泛应用于放射科AI预处理、放疗靶区定位、多中心数据标准化

weixin_34343308的博客 344

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

OCA/OCP Oracle 数据库12c考试指南读书笔记:第17章: Moving and Re-organizing Data

SQL*LOADER支持异构,DATA PUMP只支持Oracle数据库 移动数据的方式 SQL*LOADER,DATA PUMP和外部表。 创建和使用DIRECTORY 对象 Oracle DIRECTORY 运行数据库读取操作系统文件,例如Data Pump。 数据库内部,Directory权限需要赋予用户;操作系统层面,Oracle用户需有访问目录的权限。 Directory的属主是SYS,...

In-Memory Computing Technology 1177

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

医学影像重采样实战:SimpleITK统一DICOM与NIfTI体素间距

医学影像数据常因设备或扫描参数不同而呈现体素间距、层厚和方向上的差异,直接影响深度学习模型的训练稳定性与泛化能力。重采样作为医学影像预处理管线的核心环节,通过重新定义体素网格与物理空间映射,将不同来源的图像统一到标准几何参数上。SimpleITK作为医学影像处理的轻量级工具,以统一接口封装DICOM和NIfTI格式,支持体素间距调整、模板对齐及多种插值策略。本文从几何参数解析到完整代码实现,系统梳理CT、MRI和标签图的重采样方案,并分享多中心数据处理中的常见陷阱与验证技巧,为医学AI算法开发与临床科研提供

weixin_34280237的博客 828

git使用

git代码提交

ApexPredator的博客 132

phpipam实用工具安装部署

phpipam是一个开源Web IP地址管理应用程序(IPAM)。其目标是提供轻便,现代且有用的IP地址管理。它是基于PHP的应用程序,具有MySQL数据库后端,使用jQuery库,ajax和HTML5 / CSS3功能。

君临天下的博客 3585

Git常用命令汇总(方便查询,自用)

基于git的日常使用命令总结,方便使用时查询。

baidu_41722543的博客 66
上一篇: MFC Application---The Frame Window Object
下一篇: The Brush Origin
lemonade
博客等级 码龄26年 8粉丝 33原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值