- 浏览: 601410 次
- 性别:
- 来自: 广州
-
文章分类
最新评论
-
wzh051527:
我是大四实习生一个,自我感觉技术能力在第三年。。唯一不明白,为 ...
十年技术,不要再迷茫 -
room_bb:
.hrl文件怎么加入到编译规则里面?比如:pp.hrl文件-d ...
Erlang中用的makefile的一点解释 -
吉米家:
感觉帆软报表的flash打印就很不错哇,特别好用
JSP 实现报表打印 -
雪碧爱芬达:
苦逼程序员的辛酸反省与总结 -
mlyjxx:
...
十年技术,不要再迷茫
/** * com.voidelement.images.BMPDecoder Class for ActionScript 3.0 * * @author Copyright (c) 2007 munegon * @version 1.0 * * @link http://www.voidelement.com/ * @link http://void.heteml.jp/blog/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package com.voidelement.images { import flash.display.BitmapData; import flash.errors.IOError; import flash.utils.ByteArray; import flash.utils.Endian; public class BMPDecoder { //___________________________________________________________ const private const BITMAP_HEADER_TYPE:String = "BM"; private const BITMAP_FILE_HEADER_SIZE:int = 14; private const BITMAP_CORE_HEADER_SIZE:int = 12; private const BITMAP_INFO_HEADER_SIZE:int = 40; private const COMP_RGB :int = 0; private const COMP_RLE8 :int = 1; private const COMP_RLE4 :int = 2; private const COMP_BITFIELDS:int = 3; private const BIT1 :int = 1; private const BIT4 :int = 4; private const BIT8 :int = 8; private const BIT16:int = 16; private const BIT24:int = 24; private const BIT32:int = 32; //___________________________________________________________ vars private var bytes:ByteArray; private var palette:Array; private var bd:BitmapData; private var nFileSize:uint; private var nReserved1:uint; private var nReserved2:uint; private var nOffbits:uint; private var nInfoSize:uint; private var nWidth:int; private var nHeight:int; private var nPlains:uint; private var nBitsPerPixel:uint; private var nCompression:uint; private var nSizeImage:uint; private var nXPixPerMeter:int; private var nYPixPerMeter:int; private var nColorUsed:uint; private var nColorImportant:uint; private var nRMask:uint; private var nGMask:uint; private var nBMask:uint; private var nRPos:uint; private var nGPos:uint; private var nBPos:uint; private var nRMax:uint; private var nGMax:uint; private var nBMax:uint; /** * コンストラクタ */ public function BMPDecoder() { nRPos = 0; nGPos = 0; nBPos = 0; } /** * デコード * * @param デコードしたいBMPファイルのバイナリデータ */ public function decode( data:ByteArray ):BitmapData { bytes = data; bytes.endian = Endian.LITTLE_ENDIAN; bytes.position = 0; readFileHeader(); nInfoSize = bytes.readUnsignedInt(); switch ( nInfoSize ) { case BITMAP_CORE_HEADER_SIZE: readCoreHeader(); break; case BITMAP_INFO_HEADER_SIZE: readInfoHeader(); break; default: readExtendedInfoHeader(); break; } bd = new BitmapData( nWidth, nHeight ); switch ( nBitsPerPixel ){ case BIT1: readColorPalette(); decode1BitBMP(); break; case BIT4: readColorPalette(); if ( nCompression == COMP_RLE4 ){ decode4bitRLE(); } else { decode4BitBMP(); } break; case BIT8: readColorPalette(); if ( nCompression == COMP_RLE8 ){ decode8BitRLE(); } else { decode8BitBMP(); } break; case BIT16: readBitFields(); checkColorMask(); decode16BitBMP(); break; case BIT24: decode24BitBMP(); break; case BIT32: readBitFields(); checkColorMask(); decode32BitBMP(); break; default: throw new VerifyError("invalid bits per pixel : " + nBitsPerPixel ); } return bd; } /** * BITMAP FILE HEADER 読み込み */ private function readFileHeader():void { var fileHeader:ByteArray = new ByteArray(); fileHeader.endian = Endian.LITTLE_ENDIAN; try { bytes.readBytes( fileHeader, 0, BITMAP_FILE_HEADER_SIZE ); if ( fileHeader.readUTFBytes( 2 ) != BITMAP_HEADER_TYPE ){ throw new VerifyError("invalid bitmap header type"); } nFileSize = fileHeader.readUnsignedInt(); nReserved1 = fileHeader.readUnsignedShort(); nReserved2 = fileHeader.readUnsignedShort(); nOffbits = fileHeader.readUnsignedInt(); } catch ( e:IOError ) { throw new VerifyError("invalid file header"); } } /** * BITMAP CORE HEADER 読み込み */ private function readCoreHeader():void { var coreHeader:ByteArray = new ByteArray(); coreHeader.endian = Endian.LITTLE_ENDIAN; try { bytes.readBytes( coreHeader, 0, BITMAP_CORE_HEADER_SIZE - 4 ); nWidth = coreHeader.readShort(); nHeight = coreHeader.readShort(); nPlains = coreHeader.readUnsignedShort(); nBitsPerPixel = coreHeader.readUnsignedShort(); } catch ( e:IOError ) { throw new VerifyError("invalid core header"); } } /** * BITMAP INFO HEADER 読み込み */ private function readInfoHeader():void { var infoHeader:ByteArray = new ByteArray(); infoHeader.endian = Endian.LITTLE_ENDIAN; try { bytes.readBytes( infoHeader, 0, BITMAP_INFO_HEADER_SIZE - 4 ); nWidth = infoHeader.readInt(); nHeight = infoHeader.readInt(); nPlains = infoHeader.readUnsignedShort(); nBitsPerPixel = infoHeader.readUnsignedShort(); nCompression = infoHeader.readUnsignedInt(); nSizeImage = infoHeader.readUnsignedInt(); nXPixPerMeter = infoHeader.readInt(); nYPixPerMeter = infoHeader.readInt(); nColorUsed = infoHeader.readUnsignedInt(); nColorImportant = infoHeader.readUnsignedInt(); } catch ( e:IOError ) { throw new VerifyError("invalid info header"); } } /** * 拡張 BITMAP INFO HEADER 読み込み */ private function readExtendedInfoHeader():void { var infoHeader:ByteArray = new ByteArray(); infoHeader.endian = Endian.LITTLE_ENDIAN; try { bytes.readBytes( infoHeader, 0, nInfoSize - 4 ); nWidth = infoHeader.readInt(); nHeight = infoHeader.readInt(); nPlains = infoHeader.readUnsignedShort(); nBitsPerPixel = infoHeader.readUnsignedShort(); nCompression = infoHeader.readUnsignedInt(); nSizeImage = infoHeader.readUnsignedInt(); nXPixPerMeter = infoHeader.readInt(); nYPixPerMeter = infoHeader.readInt(); nColorUsed = infoHeader.readUnsignedInt(); nColorImportant = infoHeader.readUnsignedInt(); if ( infoHeader.bytesAvailable >= 4 ) nRMask = infoHeader.readUnsignedInt(); if ( infoHeader.bytesAvailable >= 4 ) nGMask = infoHeader.readUnsignedInt(); if ( infoHeader.bytesAvailable >= 4 ) nBMask = infoHeader.readUnsignedInt(); } catch ( e:IOError ) { throw new VerifyError("invalid info header"); } } /** * ビットフィールド読み込み */ private function readBitFields():void { if ( nCompression == COMP_RGB ){ if ( nBitsPerPixel == BIT16 ){ // RGB555 nRMask = 0x00007c00; nGMask = 0x000003e0; nBMask = 0x0000001f; } else { //RGB888; nRMask = 0x00ff0000; nGMask = 0x0000ff00; nBMask = 0x000000ff; } } else if ( ( nCompression == COMP_BITFIELDS ) && ( nInfoSize < 52 ) ){ try { nRMask = bytes.readUnsignedInt(); nGMask = bytes.readUnsignedInt(); nBMask = bytes.readUnsignedInt(); } catch ( e:IOError ) { throw new VerifyError("invalid bit fields"); } } } /** * カラーパレット読み込み */ private function readColorPalette():void { var i:int; var len:int = ( nColorUsed > 0 ) ? nColorUsed : Math.pow( 2, nBitsPerPixel ); palette = new Array( len ); for ( i = 0; i < len; ++i ){ palette[ i ] = bytes.readUnsignedInt(); } } /** * 1bitのBMPデコード */ private function decode1BitBMP():void { var x:int; var y:int; var i:int; var col:int; var buf:ByteArray = new ByteArray(); var line:int = nWidth / 8; if ( line % 4 > 0 ){ line = ( ( line / 4 | 0 ) + 1 ) * 4; } try { for ( y = nHeight - 1; y >= 0; --y ){ buf.length = 0; bytes.readBytes( buf, 0, line ); for ( x = 0; x < nWidth; x += 8 ){ col = buf.readUnsignedByte(); for ( i = 0; i < 8; ++i ){ bd.setPixel( x + i, y, palette[ col >> ( 7 - i ) & 0x01 ] ); } } } } catch ( e:IOError ) { throw new VerifyError("invalid image data"); } } /** * 4bitのRLE圧縮BMPデコード */ private function decode4bitRLE():void { var x:int; var y:int; var i:int; var n:int; var col:int; var data:uint; var buf:ByteArray = new ByteArray(); try { for ( y = nHeight - 1; y >= 0; --y ){ buf.length = 0; while ( bytes.bytesAvailable > 0 ){ n = bytes.readUnsignedByte(); if ( n > 0 ){ // エンコードデータ data = bytes.readUnsignedByte(); for ( i = 0; i < n/2; ++i ){ buf.writeByte( data ); } } else { n = bytes.readUnsignedByte(); if ( n > 0 ){ // 絶対モードデータ bytes.readBytes( buf, buf.length, n/2 ); buf.position += n/2; if ( n/2 + 1 >> 1 << 1 != n/2 ){ bytes.readUnsignedByte(); } } else { // EOL break; } } } buf.position = 0; for ( x = 0; x < nWidth; x += 2 ){ col = buf.readUnsignedByte(); bd.setPixel( x, y, palette[ col >> 4 ] ); bd.setPixel( x + 1, y, palette[ col & 0x0f ] ); } } } catch ( e:IOError ) { throw new VerifyError("invalid image data"); } } /** * 4bitの非圧縮BMPデコード */ private function decode4BitBMP():void { var x:int; var y:int; var i:int; var col:int; var buf:ByteArray = new ByteArray(); var line:int = nWidth / 2; if ( line % 4 > 0 ){ line = ( ( line / 4 | 0 ) + 1 ) * 4; } try { for ( y = nHeight - 1; y >= 0; --y ){ buf.length = 0; bytes.readBytes( buf, 0, line ); for ( x = 0; x < nWidth; x += 2 ){ col = buf.readUnsignedByte(); bd.setPixel( x, y, palette[ col >> 4 ] ); bd.setPixel( x + 1, y, palette[ col & 0x0f ] ); } } } catch ( e:IOError ) { throw new VerifyError("invalid image data"); } } /** * 8bitのRLE圧縮BMPデコード */ private function decode8BitRLE():void { var x:int; var y:int; var i:int; var n:int; var col:int; var data:uint; var buf:ByteArray = new ByteArray(); try { for ( y = nHeight - 1; y >= 0; --y ){ buf.length = 0; while ( bytes.bytesAvailable > 0 ){ n = bytes.readUnsignedByte(); if ( n > 0 ){ // エンコードデータ data = bytes.readUnsignedByte(); for ( i = 0; i < n; ++i ){ buf.writeByte( data ); } } else { n = bytes.readUnsignedByte(); if ( n > 0 ){ // 絶対モードデータ bytes.readBytes( buf, buf.length, n ); buf.position += n; if ( n + 1 >> 1 << 1 != n ){ bytes.readUnsignedByte(); } } else { // EOL break; } } } buf.position = 0; for ( x = 0; x < nWidth; ++x ){ bd.setPixel( x, y, palette[ buf.readUnsignedByte() ] ); } } } catch ( e:IOError ) { throw new VerifyError("invalid image data"); } } /** * 8bitの非圧縮BMPデコード */ private function decode8BitBMP():void { var x:int; var y:int; var i:int; var col:int; var buf:ByteArray = new ByteArray(); var line:int = nWidth; if ( line % 4 > 0 ){ line = ( ( line / 4 | 0 ) + 1 ) * 4; } try { for ( y = nHeight - 1; y >= 0; --y ){ buf.length = 0; bytes.readBytes( buf, 0, line ); for ( x = 0; x < nWidth; ++x ){ bd.setPixel( x, y, palette[ buf.readUnsignedByte() ] ); } } } catch ( e:IOError ) { throw new VerifyError("invalid image data"); } } /** * 16bitのBMPデコード */ private function decode16BitBMP():void { var x:int; var y:int; var col:int; try { for ( y = nHeight - 1; y >= 0; --y ){ for ( x = 0; x < nWidth; ++x ){ col = bytes.readUnsignedShort(); bd.setPixel( x, y, ( ( ( col & nRMask ) >> nRPos )*0xff/nRMax << 16 ) + ( ( ( col & nGMask ) >> nGPos )*0xff/nGMax << 8 ) + ( ( ( col & nBMask ) >> nBPos )*0xff/nBMax << 0 ) ); } } } catch ( e:IOError ) { throw new VerifyError("invalid image data"); } } /** * 24bitのBMPデコード */ private function decode24BitBMP():void { var x:int; var y:int; var col:int; var buf:ByteArray = new ByteArray(); var line:int = nWidth * 3; if ( line % 4 > 0 ){ line = ( ( line / 4 | 0 ) + 1 ) * 4; } try { for ( y = nHeight - 1; y >= 0; --y ){ buf.length = 0; bytes.readBytes( buf, 0, line ); for ( x = 0; x < nWidth; ++x ){ bd.setPixel( x, y, buf.readUnsignedByte() + ( buf.readUnsignedByte() << 8 ) + ( buf.readUnsignedByte() << 16 ) ); } } } catch ( e:IOError ) { throw new VerifyError("invalid image data"); } } /** * 32bitのBMPデコード */ private function decode32BitBMP():void { var x:int; var y:int; var col:int; try { for ( y = nHeight - 1; y >= 0; --y ){ for ( x = 0; x < nWidth; ++x ){ col = bytes.readUnsignedInt(); bd.setPixel( x, y, ( ( ( col & nRMask ) >> nRPos )*0xff/nRMax << 16 ) + ( ( ( col & nGMask ) >> nGPos )*0xff/nGMax << 8 ) + ( ( ( col & nBMask ) >> nBPos )*0xff/nBMax << 0 ) ); } } } catch ( e:IOError ) { throw new VerifyError("invalid image data"); } } /** * カラーマスクチェック */ private function checkColorMask():void { if ( ( nRMask & nGMask ) | ( nGMask & nBMask ) | ( nBMask & nRMask ) ){ throw new VerifyError("invalid bit fields"); } while ( ( nRMask >> nRPos ) & 0x00000001 == 0 ){ nRPos++; } while ( ( nGMask >> nGPos ) & 0x00000001 == 0 ){ nGPos++; } while ( ( nBMask >> nBPos ) & 0x00000001 == 0 ){ nBPos++; } nRMax = nRMask >> nRPos; nGMax = nGMask >> nGPos; nBMax = nBMask >> nBPos; } /** * 情報出力 */ public function traceInfo():void { trace("---- FILE HEADER ----"); trace("nFileSize: " + nFileSize ); trace("nReserved1: " + nReserved1 ); trace("nReserved2: " + nReserved2 ); trace("nOffbits: " + nOffbits ); trace("---- INFO HEADER ----"); trace("nWidth: " + nWidth ); trace("nHeight: " + nHeight ); trace("nPlains: " + nPlains ); trace("nBitsPerPixel: " + nBitsPerPixel ); if ( nInfoSize >= 40 ){ trace("nCompression: " + nCompression ); trace("nSizeImage: " + nSizeImage ); trace("nXPixPerMeter: " + nXPixPerMeter ); trace("nYPixPerMeter: " + nYPixPerMeter ); trace("nColorUsed: " + nColorUsed ); trace("nColorUsed: " + nColorImportant ); } if ( nInfoSize >= 52 ){ trace("nRMask: " + nRMask.toString( 2 ) ); trace("nGMask: " + nGMask.toString( 2 ) ); trace("nBMask: " + nBMask.toString( 2 ) ); } } } }
发表评论
-
as3 Loader 加载资源后内存泄露无法释放的问题。
2014-06-21 10:30 699as3 Loader 加载资源后内存泄露无法释放的问题。 ... -
as3判断flash player版本的函数
2014-06-10 20:35 857//判断当前版本是否高于9.0.115.0为例子. pr ... -
CSS 中文字体的英文名称 (simhei, simsun) 宋体 微软雅黑
2014-04-03 15:25 1063华文细黑:STHeiti Light [STXihei]华文 ... -
as3.0的垃圾回收机制
2013-09-07 14:02 1556还是同样的博客,还是同样的作者(Daniel Sidhio ... -
AIR程序多开
2013-09-07 13:55 1019AIR应用通常不能像QQ那样能进行多开操作。为了让一个用AI ... -
starling性能优化总结
2013-07-22 14:06 1490在项目开发的过程中总结了一下starling的性能优化方案: ... -
AS3 Socket从零开始
2013-07-22 12:54 1122大家如果想学AS3 Socket直接在百度里搜一下,会找到很 ... -
绕开AS3安全沙箱 跨域加载SWF
2013-07-11 12:53 928AS3的安全沙箱的确是 ... -
解决AS3在ie中初始化时stageWidth和stageHeight为0
2013-06-14 09:23 1045先看下面的一段脚本,这是比较经典的初始化脚本: pac ... -
动态获取swc中的类
2013-05-25 10:32 994想通过代码生成,来获取swc中的类,并且可以作为普通类正常使 ... -
AS3 中字符串的format功能实现
2013-05-25 10:19 855使用C#的朋友都知道,string.Format();还是挺 ... -
总结调用Flash的几种方法
2013-05-02 16:18 1689一、Adobe 提供的方法 <object wi ... -
Flash3D错误集锦
2013-05-02 14:03 964VerifyError: Error #1014: 无法找到 ... -
使用scale拉伸之后的坐标问题
2013-04-12 09:38 1313最近发现论坛多了很多 ... -
30个实用的网页设计工具
2013-03-20 09:58 854作为一位网页设计师或开发者,你一直需要搜寻获取强大的网页设计 ... -
如何成为强大的程序员?
2013-03-11 11:27 747Aaron Stannard是新创公 ... -
漫谈重构
2013-03-11 11:09 903因为工作内容的原因, ... -
AS3使用谷歌API生成二维码
2012-12-10 16:24 1381二维码在新闻杂志,网站,网络广告,电视广告等地方随处可见 ... -
OOP的聚合原则
2012-12-10 16:21 945什么是聚合? 聚合可以很好地表达对象是什么和做 ... -
压缩速率追踪
2012-11-02 14:16 1494Flash Player 11.3添加了一个压缩和解压B ...
相关推荐
标题"BMPDecoder.rar"指的是一个专门用于处理BMP图像文件的解码类,适用于ActionScript 3.0(AS3)编程环境。BMP(Bitmap)是一种常见的位图格式,广泛用于存储数字图像。在AS3中,处理这种格式的图像通常涉及到二...
1. **BMPDecoder.as**: 这个文件很可能是实现BMP文件解析的核心类。在AS3中,开发者通常会创建一个类来处理BMP文件的二进制数据,将其转化为可以显示的Bitmap对象。BMPDecoder可能包含读取BMP文件头信息、解析像素...
**正文** 在嵌入式开发领域,MicroPython是一种精简版的Python编程语言,它被设计用于资源有限的微控制器,如Arduino或Raspberry Pi Pico等。ST7735是一款广泛应用于小型TFT LCD显示屏的驱动芯片,主要用于显示图形...
- **BmpDecoder.h**:头文件,包含了BmpDecoder.c中的函数声明和其他必要的定义。 - **BmpInfoHeader.h**:定义了位图信息头结构体,这是理解位图文件格式的基础。 - **BmpPalette.h**:定义了位图调色板相关的...
在日常的开发和使用中,我们经常需要借助各种小工具来提高工作效率,例如快速启动常用的应用程序、管理文件等。一个简单但功能强大的集成工具箱可以帮助用户快速访问、启动并管理程序。今天,我们将以Python为基础,结合Tkinter和Win32API,开发一个类似Windows快捷方式的工具箱应用,能够让你轻松集成各种常用程序并一键启动
django自建博客app
《基于YOLOv8的智慧校园实验室高压灭菌锅安全联锁系统》(包含源码、可视化界面、完整数据集、部署教程)简单部署即可运行。功能完善、操作简单,适合毕设或课程设计
用于hifi测序数据的基因组组装程序
Microsoft Access 2010 数据库引擎可再发行程序包AccessDatabaseEngine-X64解压后的文件AceRedist
从大模型、智能体到复杂AI应用系统的构建——以产业大脑为例
自然语言处理之TF-IDF算法与TextRank算法的缠绵_textrank,tf-idf和两者的组合-CSDN博客.html
内容概要:2023版《科学智能 (AI4S)全球发展观察与展望》阐述了AI for Science(AI4S)在全球范围内的最新进展及其对科学和工业的深远影响。文章首先回顾了AI4S在过去一年中的快速发展,特别是在药物研发、材料科学、地质学、污染治理等多个领域的应用实例。AI4S通过结合深度学习、机器学习和其他AI技术,加速了从基础研究到实际应用的转化过程。例如,在药物研发中,AI4S帮助科学家克服了“反摩尔定律”的挑战,提高了新药研发的成功率;在材料科学中,AI4S实现了复杂材料的高效模拟,如人造钻石、石墨烯、碳纳米管等;在地质学中,AI4S通过模拟地球内部结构和物理过程,为地震学研究提供了新视角。此外,文章还探讨了大语言模型(LLMs)与科学方法的结合,指出LLMs不仅能辅助科学研究,还能生成新的科学假设并进行逻辑推理。 适合人群:具备一定科研背景或对AI技术感兴趣的科研人员、工程师、政策制定者及高校师生。
这个数据集包含了日常步数统计、睡眠时长、活跃分钟数以及消耗的卡路里,是个人健康与健身追踪的一部分。 该数据集非常适合用于以下实践: 数据清洗:现实世界中的数据往往包含缺失值、异常值或不一致之处。例如,某些天的步数可能缺失,或者存在不切实际的数值(如10,000小时的睡眠或负数的卡路里消耗)。通过处理这些问题,可以学习如何清理和准备数据进行分析。 探索性分析(发现日常习惯中的模式):可以通过分析找出日常生活中的模式和趋势,比如一周中哪一天人们通常走得最多,或是睡眠时间与活跃程度之间的关系等。 构建可视化图表(步数趋势、睡眠与活动对比图):将数据转换成易于理解的图形形式,有助于更直观地看出数据的趋势和关联。例如,绘制步数随时间变化的趋势图,或是比较睡眠时间和活动量之间的关系图。 数据叙事(将个人风格的追踪转化为可操作的见解):通过讲述故事的方式,把从数据中得到的洞察变成具体的行动建议。例如,根据某人特定时间段内的活动水平和睡眠质量,提供改善健康状况的具体建议。
框架结构天城商业办公楼5200平米(建筑图 结构图 计算书 开题报告 任务书 文献翻.zip
柴油机连杆加工工艺及夹具设计.zip
读书网首页的HTML信息
文字渐变颜色代码生成器:让文字绽放多彩魅力,演示:在信息交流日益丰富的今天,个性化的文字展示成为吸引目光的关键。这款文字渐变颜色代码生成器,便是为满足这一需求而生的绿色软件,无需安装,便捷实用。 它的操作极为简便。用户只需在软件界面中输入想要转换的文字内容,接着从丰富的色彩选项里挑选心仪的起始颜色与结束颜色,随后轻轻按下 “转换按钮”,神奇的事情就此发生 —— 适用于论坛、网页、QQ 空间等多种平台,以及自定义格式的渐变颜色代码便会即刻生成。不仅如此,生成的代码还能自动复制到剪切板,极大地节省了用户手动复制的时间。当你在论坛回帖、更新网页内容或是装扮 QQ 空间时,只需轻松粘贴代码,原本单调的文字瞬间就能拥有绚丽的渐变色彩,瞬间脱颖而出,为你的表达增添独特魅力,让文字不再平凡,轻松成为视觉焦点。 一款可以轻松把一段文字生成渐变颜色代码的绿色软件,当你在软件中输入完要转换的文字后,只需要挑选自己喜欢的起始颜色、结束颜色后,按一下―转换按钮即可生成相应的论坛/网页/QQ空间以及自定义格式代码,并且代码可以自动复制到剪切板中,回帖时直接粘贴代码即可不错得文字代码生成器,让你得文字更加漂亮.
1.【锂电池剩余寿命预测】Transformer锂电池剩余寿命预测(Matlab完整源码和数据) 2.数据集:NASA数据集,已经处理好,B0005电池训练、B0006测试; 3.环境准备:Matlab2023b,可读性强; 4.模型描述:Transformer在各种各样的问题上表现非常出色,现在被广泛使用。 5.领域描述:近年来,随着锂离子电池的能量密度、功率密度逐渐提升,其安全性能与剩余使用寿命预测变得愈发重要。本代码实现了Transformer在该领域的应用。 6.作者介绍:机器学习之心,博客专家认证,机器学习领域创作者,2023博客之星TOP50,主做机器学习和深度学习时序、回归、分类、聚类和降维等程序设计和案例分析,文章底部有博主联系方式。从事Matlab、Python算法仿真工作8年,更多仿真源码、数据集定制私信。
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。