当前位置: 首页 > news >正文

凡科做的网站可以优化ip网站查询服务器

凡科做的网站可以优化,ip网站查询服务器,网站信息更新如何做,沈阳专业做网站公司SVD方法是模型降阶的一类重要方法,本征正交分解(POD)和平衡截断(BT)都属于SVD类方法。 要想深入了解模型降阶技术,我们可以先从SVD的应用入手,做一个直观的了解。 1. SVD的定义和分类 我们想寻找…

SVD方法是模型降阶的一类重要方法,本征正交分解(POD)和平衡截断(BT)都属于SVD类方法。

要想深入了解模型降阶技术,我们可以先从SVD的应用入手,做一个直观的了解。

1. SVD的定义和分类

我们想寻找一个A的逼近:Ak,使得rank(Ak) = k < n,且|A - Ak|最小。

下面的定理(也称为Schmidt-Mirsky, Eckart-Young定理)说明矩阵A的低秩逼近可以用SVD实现:

2. SVD在图像压缩中的应用

原始图片, rank=720:

绘制其R,G,B的奇异值:

压缩图片,rank=144:

压缩图片,rank=72:

代码:

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as imageA = image.imread("svd-image-compression-img.jpg")# Each pixel (typically) consists of 3 bytes — for the red, green and blue components of the color, respectively. 
# So, if we want to efficiently store the image, we need to somehow efficiently encode 3 matrices R, G and B 
# for each color component, respectively.
# We can extract the 3 color component matrices as briefly mentioned above as follows:
# 0xff代表十进制数值255
R = A[:,:,0] / 0xff
G = A[:,:,1] / 0xff
B = A[:,:,2] / 0xff# Now, we compute the SVD decomposition:
R_U, R_S, R_VT = np.linalg.svd(R)
G_U, G_S, G_VT = np.linalg.svd(G)
B_U, B_S, B_VT = np.linalg.svd(B)# polt the singular values
xaxis = np.arange(0, len(R_S))
plt.plot(xaxis, R_S, label='R_S')
plt.plot(xaxis, G_S, label='G_S')
plt.plot(xaxis, B_S, label='B_S')
plt.legend()relative_rank = 0.1
max_rank = int(relative_rank * min(R.shape[0], R.shape[1]))
print("max rank = %d" % max_rank)  # 144def read_as_compressed(U, S, VT, k):Ak = np.zeros((U.shape[0], VT.shape[1]))for i in range(k):U_i = U[:,[i]]VT_i = np.array([VT[i]])Ak += S[i] * (U_i @ VT_i)return Ak## Actually, it is easier and more efficient to perform the same operation 
## with a lower-rank matrix multiplication.
# def read_as_compressed(U, S, VT, k):
#     return (U[:,:k] @ np.diag(S[:k])) @ VT[:k]R_compressed = read_as_compressed(R_U, R_S, R_VT, max_rank)
G_compressed = read_as_compressed(G_U, G_S, G_VT, max_rank)
B_compressed = read_as_compressed(B_U, B_S, B_VT, max_rank)compressed_float = np.dstack((R_compressed, G_compressed, B_compressed))
compressed = (np.minimum(compressed_float, 1.0) * 0xff).astype(np.uint8)# Plot
plt.figure()
plt.imshow(A)plt.figure()
plt.imshow(compressed)image.imsave("compressed.jpg", compressed)

参考资料:

[A.C. Antoulas 2001] Approximation of large-scale dynamical systems: An overview
[潘建瑜] 矩阵计算_讲义 
Compressing images with singular value decomposition (SVD) | ZeroBone
http://www.yidumall.com/news/39899.html

相关文章:

  • dw内部网站链接怎么做网站制作的基本流程是什么
  • beyond歌迷做的网站网络营销的六个特点
  • 东莞营销网站开发站长工具收录查询
  • 网站目录 index.html网站优化推广方案
  • 花生壳动态域名做网站谷歌浏览器app
  • 网站建设分什么行业网络舆情分析报告模板
  • 网址格式重庆seo技术教程
  • 淘宝几百块做网站还有其他费用吗关键词上首页的有效方法
  • 网站咋做青岛seo整站优化招商电话
  • 网站建设來超速云建站秦皇岛seo排名
  • 上海网站制作公司的排名全国疫情高峰感染高峰进度
  • 常用分类信息网站网页设计一般用什么软件
  • 设计软件排行榜百度关键词优化多久上首页
  • 可以做围棋习题的网站网站建设的推广渠道
  • 佛山网站建设邓先生网站点击率查询
  • 网站建设技术培训学校百度快照是啥
  • 读经典做临床报名网站网站运营师
  • 做网站和微信公众号如何招生网络推广方法技巧
  • 企业网站建设规划书西安百度竞价托管代运营
  • 个人能否做网站网络营销公司名称
  • 南昌网站排名优化价格网站策划书怎么写
  • 做外贸生意上哪个网站网络营销课程心得体会
  • 太原城市建设招标网站广告
  • wordpress 伪静态404信息流优化师怎么入行
  • 建筑公司招聘信息上海知名的seo推广咨询
  • 建站空间seo案例分析
  • 上海泵阀网站建设苏州网站建设公司
  • 网站需求怎么做产品网络推广的方法有哪些
  • 电子商务网站建设臧良运课后答案seo优化设计
  • 在美国做网站免费的自媒体一键发布平台